From 7b8c458cca7d21a029620f98e453f746fce69cd1 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 14 Jul 2014 16:10:01 +0200 Subject: Prefer single quote for dict key name --- module/plugins/hoster/Xdcc.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'module/plugins/hoster/Xdcc.py') diff --git a/module/plugins/hoster/Xdcc.py b/module/plugins/hoster/Xdcc.py index d6083e4f7..8f3fb284f 100644 --- a/module/plugins/hoster/Xdcc.py +++ b/module/plugins/hoster/Xdcc.py @@ -166,31 +166,31 @@ class Xdcc(Hoster): "text": msg[3][1:] } - if nick == msg["target"][0:len(nick)] and "PRIVMSG" == msg["action"]: - if msg["text"] == "\x01VERSION\x01": + if nick == msg['target'][0:len(nick)] and "PRIVMSG" == msg['action']: + if msg['text'] == "\x01VERSION\x01": self.logDebug("XDCC: Sending CTCP VERSION.") sock.send("NOTICE %s :%s\r\n" % (msg['origin'], "pyLoad! IRC Interface")) - elif msg["text"] == "\x01TIME\x01": + elif msg['text'] == "\x01TIME\x01": self.logDebug("Sending CTCP TIME.") sock.send("NOTICE %s :%d\r\n" % (msg['origin'], time.time())) - elif msg["text"] == "\x01LAG\x01": + elif msg['text'] == "\x01LAG\x01": pass # don't know how to answer - if not (bot == msg["origin"][0:len(bot)] - and nick == msg["target"][0:len(nick)] - and msg["action"] in ("PRIVMSG", "NOTICE")): + if not (bot == msg['origin'][0:len(bot)] + and nick == msg['target'][0:len(nick)] + and msg['action'] in ("PRIVMSG", "NOTICE")): continue if self.debug is 1: - print "%s: %s" % (msg["origin"], msg["text"]) + print "%s: %s" % (msg['origin'], msg['text']) - if "You already requested that pack" in msg["text"]: + if "You already requested that pack" in msg['text']: retry = time.time() + 300 - if "you must be on a known channel to request a pack" in msg["text"]: + if "you must be on a known channel to request a pack" in msg['text']: self.fail("Wrong channel") - m = re.match('\x01DCC SEND (.*?) (\d+) (\d+)(?: (\d+))?\x01', msg["text"]) + m = re.match('\x01DCC SEND (.*?) (\d+) (\d+)(?: (\d+))?\x01', msg['text']) if m: done = True -- cgit v1.2.3