summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/XDCC.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/hoster/XDCC.py')
-rw-r--r--module/plugins/hoster/XDCC.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/module/plugins/hoster/XDCC.py b/module/plugins/hoster/XDCC.py
index 405673fa4..172ba2fbd 100644
--- a/module/plugins/hoster/XDCC.py
+++ b/module/plugins/hoster/XDCC.py
@@ -14,7 +14,7 @@ from module.plugins.internal.misc import fsjoin
class XDCC(Hoster):
__name__ = "XDCC"
__type__ = "hoster"
- __version__ = "0.39"
+ __version__ = "0.40"
__status__ = "testing"
__config__ = [("nick", "str", "Nickname", "pyload"),
@@ -149,7 +149,7 @@ class XDCC(Hoster):
'text': msg[3][1:]
}
- if nick is msg['target'][0:len(nick)] and "PRIVMSG" is msg['action']:
+ if nick == msg['target'][0:len(nick)] and "PRIVMSG" == msg['action']:
if msg['text'] == "\x01VERSION\x01":
self.log_debug("Sending CTCP VERSION")
sock.send("NOTICE %s :%s\r\n" % (msg['origin'], "pyLoad! IRC Interface"))
@@ -159,8 +159,8 @@ class XDCC(Hoster):
elif msg['text'] == "\x01LAG\x01":
pass #: don't know how to answer
- if not (bot is msg['origin'][0:len(bot)]
- and nick is msg['target'][0:len(nick)]
+ if not (bot == msg['origin'][0:len(bot)]
+ and nick == msg['target'][0:len(nick)]
and msg['action'] in ("PRIVMSG", "NOTICE")):
continue
@@ -194,7 +194,7 @@ class XDCC(Hoster):
self.pyfile.setStatus("downloading")
newname = self.req.download(ip, port, filename, sock, self.pyfile.setProgress)
- if newname and newname is not filename:
+ if newname and newname != filename:
self.log_info(_("%(name)s saved as %(newname)s") % {'name': self.pyfile.name, 'newname': newname})
filename = newname