diff options
Diffstat (limited to 'module/plugins/hoster/Xdcc.py')
-rw-r--r-- | module/plugins/hoster/Xdcc.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/module/plugins/hoster/Xdcc.py b/module/plugins/hoster/Xdcc.py index bfa62b8db..b77e7c1da 100644 --- a/module/plugins/hoster/Xdcc.py +++ b/module/plugins/hoster/Xdcc.py @@ -4,11 +4,11 @@ import re import socket import struct import sys +import time from os import makedirs from os.path import exists, join from select import select -from time import time from module.plugins.Hoster import Hoster from module.utils import save_join @@ -84,12 +84,12 @@ class Xdcc(Hoster): ####################### # CONNECT TO IRC AND IDLE FOR REAL LINK - dl_time = time() + dl_time = time.time() sock = socket.socket() sock.connect((host, int(port))) if nick == "pyload": - nick = "pyload-%d" % (time() % 1000) # last 3 digits + nick = "pyload-%d" % (time.time() % 1000) # last 3 digits sock.send("NICK %s\r\n" % nick) sock.send("USER %s %s bla :%s\r\n" % (ident, host, real)) @@ -111,13 +111,13 @@ class Xdcc(Hoster): break if retry: - if time() > retry: + if time.time() > retry: retry = None - dl_time = time() + dl_time = time.time() sock.send("PRIVMSG %s :xdcc send #%s\r\n" % (bot, pack)) else: - if (dl_time + self.timeout) < time(): # todo: add in config + if (dl_time + self.timeout) < time.time(): # todo: add in config sock.send("QUIT :byebye\r\n") sock.close() self.fail(_("XDCC Bot did not answer")) @@ -159,7 +159,7 @@ class Xdcc(Hoster): sock.send("NOTICE %s :%s\r\n" % (msg['origin'], "pyLoad! IRC Interface")) elif msg['text'] == "\x01TIME\x01": self.logDebug("Sending CTCP TIME") - sock.send("NOTICE %s :%d\r\n" % (msg['origin'], time())) + sock.send("NOTICE %s :%d\r\n" % (msg['origin'], time.time())) elif msg['text'] == "\x01LAG\x01": pass # don't know how to answer @@ -172,7 +172,7 @@ class Xdcc(Hoster): print "%s: %s" % (msg['origin'], msg['text']) if "You already requested that pack" in msg['text']: - retry = time() + 300 + retry = time.time() + 300 if "you must be on a known channel to request a pack" in msg['text']: self.fail(_("Wrong channel")) |