diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-02-22 23:14:43 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-02-22 23:14:43 +0100 |
commit | 6d1fa0e753073a00d9075227a6474f855157fc5d (patch) | |
tree | 17d56ea921443174393954d237e7563779f0f3e7 /module/CaptchaManager.py | |
parent | filesonic info prefetching + premium fix (diff) | |
download | pyload-6d1fa0e753073a00d9075227a6474f855157fc5d.tar.xz |
captcha input via IRC, XMPP
Diffstat (limited to 'module/CaptchaManager.py')
-rw-r--r-- | module/CaptchaManager.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/module/CaptchaManager.py b/module/CaptchaManager.py index 8296fb9c6..4ebfee30d 100644 --- a/module/CaptchaManager.py +++ b/module/CaptchaManager.py @@ -49,7 +49,7 @@ class CaptchaManager(): self.lock.release() return None - def getTaskFromID(self, tid): + def getTaskByID(self, tid): self.lock.acquire() for task in self.tasks: if task.id == tid: @@ -62,7 +62,6 @@ class CaptchaManager(): cli = self.core.isClientConnected() if cli: #client connected -> should solve the captcha - self.tasks.append(task) task.setWaiting(50) #wait 50 sec for response for plugin in self.core.hookManager.activePlugins(): @@ -73,6 +72,7 @@ class CaptchaManager(): print_exc() if task.handler or cli: #the captcha was handled + self.tasks.append(task) return True task.error = _("No Client connected for captcha decrypting") @@ -113,7 +113,7 @@ class CaptchaTask(): def setWaiting(self, sec): """ let the captcha wait secs for the solution """ - self.waitUntil = time() + sec + self.waitUntil = max(time() + sec, self.waitUntil) self.status = "waiting" def isWaiting(self): |