From 0e1ef9bc01579328e17e79416fa3c1c7b77adcc8 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 8 Jun 2015 06:08:01 +0200 Subject: Update everything --- module/plugins/hooks/IRCInterface.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hooks/IRCInterface.py') diff --git a/module/plugins/hooks/IRCInterface.py b/module/plugins/hooks/IRCInterface.py index 33fde3d20..751556158 100644 --- a/module/plugins/hooks/IRCInterface.py +++ b/module/plugins/hooks/IRCInterface.py @@ -12,14 +12,14 @@ from threading import Thread from module.Api import PackageDoesNotExists, FileDoesNotExists from module.network.RequestFactory import getURL -from module.plugins.Hook import Hook +from module.plugins.internal.Hook import Hook from module.utils import formatSize class IRCInterface(Thread, Hook): __name__ = "IRCInterface" __type__ = "hook" - __version__ = "0.13" + __version__ = "0.14" __config__ = [("host", "str", "IRC-Server Address", "Enter your server here!"), ("port", "int", "IRC-Server Port", 6667), -- cgit v1.2.3 From f4b893e5ee24769584a2da1866c665489f7019ec Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 15 Jun 2015 06:56:13 +0200 Subject: Hook plugin code cosmetics --- module/plugins/hooks/IRCInterface.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hooks/IRCInterface.py') diff --git a/module/plugins/hooks/IRCInterface.py b/module/plugins/hooks/IRCInterface.py index 751556158..7e4d50384 100644 --- a/module/plugins/hooks/IRCInterface.py +++ b/module/plugins/hooks/IRCInterface.py @@ -71,7 +71,7 @@ class IRCInterface(Thread, Hook): pass - def newCaptchaTask(self, task): + def captcha_task(self, task): if self.getConfig('captcha') and task.isTextual(): task.handler.append(self) task.setWaiting(60) -- cgit v1.2.3 From c9144f451b74e4d3cc67935b9e73c662ac870c6e Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 15 Jun 2015 07:18:39 +0200 Subject: Hook plugin code cosmetics (2) --- module/plugins/hooks/IRCInterface.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hooks/IRCInterface.py') diff --git a/module/plugins/hooks/IRCInterface.py b/module/plugins/hooks/IRCInterface.py index 7e4d50384..b3b3d9b89 100644 --- a/module/plugins/hooks/IRCInterface.py +++ b/module/plugins/hooks/IRCInterface.py @@ -46,7 +46,7 @@ class IRCInterface(Thread, Hook): self.setDaemon(True) - def coreReady(self): + def activate(self): self.abort = False self.more = [] self.new_package = {} -- cgit v1.2.3 From 5a139055ae658d3a05cbb658cbd66aeae0d01db5 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 15 Jun 2015 21:06:10 +0200 Subject: Spare code cosmetics --- module/plugins/hooks/IRCInterface.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hooks/IRCInterface.py') diff --git a/module/plugins/hooks/IRCInterface.py b/module/plugins/hooks/IRCInterface.py index b3b3d9b89..e24691bde 100644 --- a/module/plugins/hooks/IRCInterface.py +++ b/module/plugins/hooks/IRCInterface.py @@ -54,7 +54,7 @@ class IRCInterface(Thread, Hook): self.start() - def packageFinished(self, pypack): + def package_finished(self, pypack): try: if self.getConfig('info_pack'): self.response(_("Package finished: %s") % pypack.name) @@ -62,7 +62,7 @@ class IRCInterface(Thread, Hook): pass - def downloadFinished(self, pyfile): + def download_finished(self, pyfile): try: if self.getConfig('info_file'): self.response( -- cgit v1.2.3 From c1764e2fea0bb05164c83a876e8cd58b97f58f25 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 16 Jun 2015 17:31:38 +0200 Subject: Update all --- module/plugins/hooks/IRCInterface.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'module/plugins/hooks/IRCInterface.py') diff --git a/module/plugins/hooks/IRCInterface.py b/module/plugins/hooks/IRCInterface.py index e24691bde..9176f2d2c 100644 --- a/module/plugins/hooks/IRCInterface.py +++ b/module/plugins/hooks/IRCInterface.py @@ -11,7 +11,6 @@ from select import select from threading import Thread from module.Api import PackageDoesNotExists, FileDoesNotExists -from module.network.RequestFactory import getURL from module.plugins.internal.Hook import Hook from module.utils import formatSize @@ -76,8 +75,8 @@ class IRCInterface(Thread, Hook): task.handler.append(self) task.setWaiting(60) - html = getURL("http://www.freeimagehosting.net/upload.php", - post={"attached": (pycurl.FORM_FILE, task.captchaFile)}, multipart=True) + html = self.load("http://www.freeimagehosting.net/upload.php", + post={"attached": (pycurl.FORM_FILE, task.captchaFile)}) url = re.search(r"\[img\]([^\[]+)\[/img\]\[/url\]", html).group(1) self.response(_("New Captcha Request: %s") % url) -- cgit v1.2.3 From 164512b6a74c94a731fcee7435dce1ccfa2f71e7 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 17 Jun 2015 18:29:50 +0200 Subject: Spare code cosmetics --- module/plugins/hooks/IRCInterface.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'module/plugins/hooks/IRCInterface.py') diff --git a/module/plugins/hooks/IRCInterface.py b/module/plugins/hooks/IRCInterface.py index 9176f2d2c..d50fd6107 100644 --- a/module/plugins/hooks/IRCInterface.py +++ b/module/plugins/hooks/IRCInterface.py @@ -392,7 +392,9 @@ class IRCInterface(Thread, Hook): def event_c(self, args): - """ captcha answer """ + """ + Captcha answer + """ if not args: return ["ERROR: Captcha ID missing."] -- cgit v1.2.3 From 20b6a2ec022202b0efb6cb69415239fb8f4d1445 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 17 Jun 2015 18:59:20 +0200 Subject: Spare code cosmetics (2) --- module/plugins/hooks/IRCInterface.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/hooks/IRCInterface.py') diff --git a/module/plugins/hooks/IRCInterface.py b/module/plugins/hooks/IRCInterface.py index d50fd6107..61922f657 100644 --- a/module/plugins/hooks/IRCInterface.py +++ b/module/plugins/hooks/IRCInterface.py @@ -84,7 +84,7 @@ class IRCInterface(Thread, Hook): def run(self): - # connect to IRC etc. + #: connect to IRC etc. self.sock = socket.socket() host = self.getConfig('host') self.sock.connect((host, self.getConfig('port'))) @@ -158,7 +158,7 @@ class IRCInterface(Thread, Hook): if msg['action'] != "PRIVMSG": return - # HANDLE CTCP ANTI FLOOD/BOT PROTECTION + #: HANDLE CTCP ANTI FLOOD/BOT PROTECTION if msg['text'] == "\x01VERSION\x01": self.logDebug("Sending CTCP VERSION") self.sock.send("NOTICE %s :%s\r\n" % (msg['origin'], "pyLoad! IRC Interface")) @@ -344,7 +344,7 @@ class IRCInterface(Thread, Hook): return ["INFO: Added %d links to Package %s [#%d]" % (len(links), pack['name'], id)] except Exception: - # create new package + #: create new package id = self.core.api.addPackage(pack, links, 1) return ["INFO: Created new Package %s [#%d] with %d links." % (pack, id, len(links))] -- cgit v1.2.3 From e4fb45b22d36595839e8f638a3f0a4669dba3e8d Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 21 Jun 2015 08:50:26 +0200 Subject: Spare code cosmetics (4) --- module/plugins/hooks/IRCInterface.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'module/plugins/hooks/IRCInterface.py') diff --git a/module/plugins/hooks/IRCInterface.py b/module/plugins/hooks/IRCInterface.py index 61922f657..7cdd7624f 100644 --- a/module/plugins/hooks/IRCInterface.py +++ b/module/plugins/hooks/IRCInterface.py @@ -20,16 +20,16 @@ class IRCInterface(Thread, Hook): __type__ = "hook" __version__ = "0.14" - __config__ = [("host", "str", "IRC-Server Address", "Enter your server here!"), - ("port", "int", "IRC-Server Port", 6667), - ("ident", "str", "Clients ident", "pyload-irc"), - ("realname", "str", "Realname", "pyload-irc"), - ("ssl", "bool", "Use SSL", False), - ("nick", "str", "Nickname the Client will take", "pyLoad-IRC"), - ("owner", "str", "Nickname the Client will accept commands from", "Enter your nick here!"), - ("info_file", "bool", "Inform about every file finished", False), - ("info_pack", "bool", "Inform about every package finished", True), - ("captcha", "bool", "Send captcha requests", True)] + __config__ = [("host" , "str" , "IRC-Server Address" , "Enter your server here!"), + ("port" , "int" , "IRC-Server Port" , 6667 ), + ("ident" , "str" , "Clients ident" , "pyload-irc" ), + ("realname" , "str" , "Realname" , "pyload-irc" ), + ("ssl" , "bool", "Use SSL" , False ), + ("nick" , "str" , "Nickname the Client will take" , "pyLoad-IRC" ), + ("owner" , "str" , "Nickname the Client will accept commands from", "Enter your nick here!" ), + ("info_file", "bool", "Inform about every file finished" , False ), + ("info_pack", "bool", "Inform about every package finished" , True ), + ("captcha" , "bool", "Send captcha requests" , True )] __description__ = """Connect to irc and let owner perform different tasks""" __license__ = "GPLv3" -- cgit v1.2.3 From b1759bc440cd6013837697eb8de540914f693ffd Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 7 Jul 2015 01:23:55 +0200 Subject: No camelCase style anymore --- module/plugins/hooks/IRCInterface.py | 40 ++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'module/plugins/hooks/IRCInterface.py') diff --git a/module/plugins/hooks/IRCInterface.py b/module/plugins/hooks/IRCInterface.py index 7cdd7624f..32597aa42 100644 --- a/module/plugins/hooks/IRCInterface.py +++ b/module/plugins/hooks/IRCInterface.py @@ -18,7 +18,7 @@ from module.utils import formatSize class IRCInterface(Thread, Hook): __name__ = "IRCInterface" __type__ = "hook" - __version__ = "0.14" + __version__ = "0.15" __config__ = [("host" , "str" , "IRC-Server Address" , "Enter your server here!"), ("port" , "int" , "IRC-Server Port" , 6667 ), @@ -42,7 +42,7 @@ class IRCInterface(Thread, Hook): def __init__(self, core, manager): Thread.__init__(self) Hook.__init__(self, core, manager) - self.setDaemon(True) + self.set_daemon(True) def activate(self): @@ -55,7 +55,7 @@ class IRCInterface(Thread, Hook): def package_finished(self, pypack): try: - if self.getConfig('info_pack'): + if self.get_config('info_pack'): self.response(_("Package finished: %s") % pypack.name) except Exception: pass @@ -63,7 +63,7 @@ class IRCInterface(Thread, Hook): def download_finished(self, pyfile): try: - if self.getConfig('info_file'): + if self.get_config('info_file'): self.response( _("Download finished: %(name)s @ %(plugin)s ") % {"name": pyfile.name, "plugin": pyfile.pluginname}) except Exception: @@ -71,7 +71,7 @@ class IRCInterface(Thread, Hook): def captcha_task(self, task): - if self.getConfig('captcha') and task.isTextual(): + if self.get_config('captcha') and task.isTextual(): task.handler.append(self) task.setWaiting(60) @@ -86,20 +86,20 @@ class IRCInterface(Thread, Hook): def run(self): #: connect to IRC etc. self.sock = socket.socket() - host = self.getConfig('host') - self.sock.connect((host, self.getConfig('port'))) + host = self.get_config('host') + self.sock.connect((host, self.get_config('port'))) - if self.getConfig('ssl'): + if self.get_config('ssl'): self.sock = ssl.wrap_socket(self.sock, cert_reqs=ssl.CERT_NONE) #@TODO: support certificate - nick = self.getConfig('nick') + nick = self.get_config('nick') self.sock.send("NICK %s\r\n" % nick) self.sock.send("USER %s %s bla :%s\r\n" % (nick, host, nick)) - for t in self.getConfig('owner').split(): + for t in self.get_config('owner').split(): if t.strip().startswith("#"): self.sock.send("JOIN %s\r\n" % t.strip()) - self.logInfo(_("Connected to"), host) - self.logInfo(_("Switching to listening mode!")) + self.log_info(_("Connected to"), host) + self.log_info(_("Switching to listening mode!")) try: self.main_loop() @@ -149,10 +149,10 @@ class IRCInterface(Thread, Hook): def handle_events(self, msg): - if not msg['origin'].split("!", 1)[0] in self.getConfig('owner').split(): + if not msg['origin'].split("!", 1)[0] in self.get_config('owner').split(): return - if msg['target'].split("!", 1)[0] != self.getConfig('nick'): + if msg['target'].split("!", 1)[0] != self.get_config('nick'): return if msg['action'] != "PRIVMSG": @@ -160,15 +160,15 @@ class IRCInterface(Thread, Hook): #: HANDLE CTCP ANTI FLOOD/BOT PROTECTION if msg['text'] == "\x01VERSION\x01": - self.logDebug("Sending CTCP VERSION") + self.log_debug("Sending CTCP VERSION") self.sock.send("NOTICE %s :%s\r\n" % (msg['origin'], "pyLoad! IRC Interface")) return elif msg['text'] == "\x01TIME\x01": - self.logDebug("Sending CTCP TIME") + self.log_debug("Sending CTCP TIME") self.sock.send("NOTICE %s :%d\r\n" % (msg['origin'], time.time())) return elif msg['text'] == "\x01LAG\x01": - self.logDebug("Received CTCP LAG") #: don't know how to answer + self.log_debug("Received CTCP LAG") #: don't know how to answer return trigger = "pass" @@ -188,12 +188,12 @@ class IRCInterface(Thread, Hook): for line in res: self.response(line, msg['origin']) except Exception, e: - self.logError(e) + self.log_error(e) def response(self, msg, origin=""): if origin == "": - for t in self.getConfig('owner').split(): + for t in self.get_config('owner').split(): self.sock.send("PRIVMSG %s :%s\r\n" % (t.strip(), msg)) else: self.sock.send("PRIVMSG %s :%s\r\n" % (origin.split("!", 1)[0], msg)) @@ -339,7 +339,7 @@ class IRCInterface(Thread, Hook): if not pack: return ["ERROR: Package doesn't exists."] - #TODO add links + # TODO add links return ["INFO: Added %d links to Package %s [#%d]" % (len(links), pack['name'], id)] -- cgit v1.2.3 From dad722ac7255640e7e0541c4094a4d2e4de79cd3 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 19 Jul 2015 00:05:58 +0200 Subject: Code cosmetics (2) --- module/plugins/hooks/IRCInterface.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/hooks/IRCInterface.py') diff --git a/module/plugins/hooks/IRCInterface.py b/module/plugins/hooks/IRCInterface.py index 32597aa42..5d8376b4e 100644 --- a/module/plugins/hooks/IRCInterface.py +++ b/module/plugins/hooks/IRCInterface.py @@ -84,7 +84,7 @@ class IRCInterface(Thread, Hook): def run(self): - #: connect to IRC etc. + #: Connect to IRC etc. self.sock = socket.socket() host = self.get_config('host') self.sock.connect((host, self.get_config('port'))) @@ -339,12 +339,12 @@ class IRCInterface(Thread, Hook): if not pack: return ["ERROR: Package doesn't exists."] - # TODO add links + #@TODO: add links return ["INFO: Added %d links to Package %s [#%d]" % (len(links), pack['name'], id)] except Exception: - #: create new package + #: Create new package id = self.core.api.addPackage(pack, links, 1) return ["INFO: Created new Package %s [#%d] with %d links." % (pack, id, len(links))] -- cgit v1.2.3 From 502517f37c7540b0bddb092e69386d9d6f08800c Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 19 Jul 2015 09:42:34 +0200 Subject: Fix addons --- module/plugins/hooks/IRCInterface.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'module/plugins/hooks/IRCInterface.py') diff --git a/module/plugins/hooks/IRCInterface.py b/module/plugins/hooks/IRCInterface.py index 5d8376b4e..e31435e96 100644 --- a/module/plugins/hooks/IRCInterface.py +++ b/module/plugins/hooks/IRCInterface.py @@ -11,11 +11,11 @@ from select import select from threading import Thread from module.Api import PackageDoesNotExists, FileDoesNotExists -from module.plugins.internal.Hook import Hook +from module.plugins.internal.Addon import Addon from module.utils import formatSize -class IRCInterface(Thread, Hook): +class IRCInterface(Thread, Addon): __name__ = "IRCInterface" __type__ = "hook" __version__ = "0.15" @@ -36,12 +36,9 @@ class IRCInterface(Thread, Hook): __authors__ = [("Jeix", "Jeix@hasnomail.com")] - interval = 0 #@TODO: Remove in 0.4.10 - - def __init__(self, core, manager): Thread.__init__(self) - Hook.__init__(self, core, manager) + Addon.__init__(self, core, manager) self.set_daemon(True) -- cgit v1.2.3 From ff9383bfe06d14d23bc0ed6af79aa8967965d078 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 19 Jul 2015 10:59:52 +0200 Subject: Code cosmetics (3) --- module/plugins/hooks/IRCInterface.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'module/plugins/hooks/IRCInterface.py') diff --git a/module/plugins/hooks/IRCInterface.py b/module/plugins/hooks/IRCInterface.py index e31435e96..732340e3e 100644 --- a/module/plugins/hooks/IRCInterface.py +++ b/module/plugins/hooks/IRCInterface.py @@ -62,7 +62,7 @@ class IRCInterface(Thread, Addon): try: if self.get_config('info_file'): self.response( - _("Download finished: %(name)s @ %(plugin)s ") % {"name": pyfile.name, "plugin": pyfile.pluginname}) + _("Download finished: %(name)s @ %(plugin)s ") % {'name': pyfile.name, 'plugin': pyfile.pluginname}) except Exception: pass @@ -73,7 +73,7 @@ class IRCInterface(Thread, Addon): task.setWaiting(60) html = self.load("http://www.freeimagehosting.net/upload.php", - post={"attached": (pycurl.FORM_FILE, task.captchaFile)}) + post={'attached': (pycurl.FORM_FILE, task.captchaFile)}) url = re.search(r"\[img\]([^\[]+)\[/img\]\[/url\]", html).group(1) self.response(_("New Captcha Request: %s") % url) @@ -136,10 +136,10 @@ class IRCInterface(Thread, Addon): continue msg = { - "origin": msg[0][1:], - "action": msg[1], - "target": msg[2], - "text": msg[3][1:] + 'origin': msg[0][1:], + 'action': msg[1], + 'target': msg[2], + 'text': msg[3][1:] } self.handle_events(msg) -- cgit v1.2.3 From 56389e28ba5d2f5658278bc7f486d73be747f135 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 19 Jul 2015 11:44:49 +0200 Subject: Rename self.core to self.pyload (plugins only) --- module/plugins/hooks/IRCInterface.py | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'module/plugins/hooks/IRCInterface.py') diff --git a/module/plugins/hooks/IRCInterface.py b/module/plugins/hooks/IRCInterface.py index 732340e3e..1f2db0a14 100644 --- a/module/plugins/hooks/IRCInterface.py +++ b/module/plugins/hooks/IRCInterface.py @@ -203,7 +203,7 @@ class IRCInterface(Thread, Addon): def event_status(self, args): - downloads = self.core.api.statusDownloads() + downloads = self.pyload.api.statusDownloads() if not downloads: return ["INFO: There are no active downloads currently."] @@ -229,7 +229,7 @@ class IRCInterface(Thread, Addon): def event_queue(self, args): - ps = self.core.api.getQueueData() + ps = self.pyload.api.getQueueData() if not ps: return ["INFO: There are no packages in queue."] @@ -242,7 +242,7 @@ class IRCInterface(Thread, Addon): def event_collector(self, args): - ps = self.core.api.getCollectorData() + ps = self.pyload.api.getCollectorData() if not ps: return ["INFO: No packages in collector!"] @@ -259,7 +259,7 @@ class IRCInterface(Thread, Addon): info = None try: - info = self.core.api.getFileData(int(args[0])) + info = self.pyload.api.getFileData(int(args[0])) except FileDoesNotExists: return ["ERROR: Link doesn't exists."] @@ -274,7 +274,7 @@ class IRCInterface(Thread, Addon): lines = [] pack = None try: - pack = self.core.api.getPackageData(int(args[0])) + pack = self.pyload.api.getPackageData(int(args[0])) except PackageDoesNotExists: return ["ERROR: Package doesn't exists."] @@ -311,12 +311,12 @@ class IRCInterface(Thread, Addon): def event_start(self, args): - self.core.api.unpauseServer() + self.pyload.api.unpauseServer() return ["INFO: Starting downloads."] def event_stop(self, args): - self.core.api.pauseServer() + self.pyload.api.pauseServer() return ["INFO: No new downloads will be started."] @@ -332,7 +332,7 @@ class IRCInterface(Thread, Addon): count_failed = 0 try: id = int(pack) - pack = self.core.api.getPackageData(id) + pack = self.pyload.api.getPackageData(id) if not pack: return ["ERROR: Package doesn't exists."] @@ -342,7 +342,7 @@ class IRCInterface(Thread, Addon): except Exception: #: Create new package - id = self.core.api.addPackage(pack, links, 1) + id = self.pyload.api.addPackage(pack, links, 1) return ["INFO: Created new Package %s [#%d] with %d links." % (pack, id, len(links))] @@ -351,11 +351,11 @@ class IRCInterface(Thread, Addon): return ["ERROR: Use del command like this: del -p|-l [...] (-p indicates that the ids are from packages, -l indicates that the ids are from links)"] if args[0] == "-p": - ret = self.core.api.deletePackages(map(int, args[1:])) + ret = self.pyload.api.deletePackages(map(int, args[1:])) return ["INFO: Deleted %d packages!" % len(args[1:])] elif args[0] == "-l": - ret = self.core.api.delLinks(map(int, args[1:])) + ret = self.pyload.api.delLinks(map(int, args[1:])) return ["INFO: Deleted %d links!" % len(args[1:])] else: @@ -368,11 +368,11 @@ class IRCInterface(Thread, Addon): id = int(args[0]) try: - info = self.core.api.getPackageInfo(id) + info = self.pyload.api.getPackageInfo(id) except PackageDoesNotExists: return ["ERROR: Package #%d does not exist." % id] - self.core.api.pushToQueue(id) + self.pyload.api.pushToQueue(id) return ["INFO: Pushed package #%d to queue." % id] @@ -381,10 +381,10 @@ class IRCInterface(Thread, Addon): return ["ERROR: Pull package from queue like this: pull ."] id = int(args[0]) - if not self.core.api.getPackageData(id): + if not self.pyload.api.getPackageData(id): return ["ERROR: Package #%d does not exist." % id] - self.core.api.pullFromQueue(id) + self.pyload.api.pullFromQueue(id) return ["INFO: Pulled package #%d from queue to collector." % id] @@ -395,7 +395,7 @@ class IRCInterface(Thread, Addon): if not args: return ["ERROR: Captcha ID missing."] - task = self.core.captchaManager.getTaskByID(args[0]) + task = self.pyload.captchaManager.getTaskByID(args[0]) if not task: return ["ERROR: Captcha Task with ID %s does not exists." % args[0]] -- cgit v1.2.3 From d38e830b7c0b3c6561a0072c74bbccb5fcdf4a61 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 19 Jul 2015 14:43:42 +0200 Subject: New __status__ magic key --- module/plugins/hooks/IRCInterface.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/hooks/IRCInterface.py') diff --git a/module/plugins/hooks/IRCInterface.py b/module/plugins/hooks/IRCInterface.py index 1f2db0a14..54a94f6ec 100644 --- a/module/plugins/hooks/IRCInterface.py +++ b/module/plugins/hooks/IRCInterface.py @@ -19,6 +19,7 @@ class IRCInterface(Thread, Addon): __name__ = "IRCInterface" __type__ = "hook" __version__ = "0.15" + __status__ = "stable" __config__ = [("host" , "str" , "IRC-Server Address" , "Enter your server here!"), ("port" , "int" , "IRC-Server Port" , 6667 ), -- cgit v1.2.3 From 94d017cd2a5c1f194960827a8c7e46afc3682008 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 24 Jul 2015 06:55:49 +0200 Subject: Hotfixes (2) --- module/plugins/hooks/IRCInterface.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hooks/IRCInterface.py') diff --git a/module/plugins/hooks/IRCInterface.py b/module/plugins/hooks/IRCInterface.py index 54a94f6ec..b46310950 100644 --- a/module/plugins/hooks/IRCInterface.py +++ b/module/plugins/hooks/IRCInterface.py @@ -19,7 +19,7 @@ class IRCInterface(Thread, Addon): __name__ = "IRCInterface" __type__ = "hook" __version__ = "0.15" - __status__ = "stable" + __status__ = "testing" __config__ = [("host" , "str" , "IRC-Server Address" , "Enter your server here!"), ("port" , "int" , "IRC-Server Port" , 6667 ), -- cgit v1.2.3 From 761ca5c66e07559925ebbdbc6531f9ca658b12ce Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 24 Jul 2015 16:11:58 +0200 Subject: Code cosmetics --- module/plugins/hooks/IRCInterface.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hooks/IRCInterface.py') diff --git a/module/plugins/hooks/IRCInterface.py b/module/plugins/hooks/IRCInterface.py index b46310950..c018850b6 100644 --- a/module/plugins/hooks/IRCInterface.py +++ b/module/plugins/hooks/IRCInterface.py @@ -150,7 +150,7 @@ class IRCInterface(Thread, Addon): if not msg['origin'].split("!", 1)[0] in self.get_config('owner').split(): return - if msg['target'].split("!", 1)[0] != self.get_config('nick'): + if msg['target'].split("!", 1)[0] not is self.get_config('nick'): return if msg['action'] != "PRIVMSG": -- cgit v1.2.3 From dd13825fbd3df9e441200638cd2a92e3924dfff6 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 24 Jul 2015 23:57:04 +0200 Subject: Fix typo --- module/plugins/hooks/IRCInterface.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hooks/IRCInterface.py') diff --git a/module/plugins/hooks/IRCInterface.py b/module/plugins/hooks/IRCInterface.py index c018850b6..08b1bad0c 100644 --- a/module/plugins/hooks/IRCInterface.py +++ b/module/plugins/hooks/IRCInterface.py @@ -150,7 +150,7 @@ class IRCInterface(Thread, Addon): if not msg['origin'].split("!", 1)[0] in self.get_config('owner').split(): return - if msg['target'].split("!", 1)[0] not is self.get_config('nick'): + if msg['target'].split("!", 1)[0] is not self.get_config('nick'): return if msg['action'] != "PRIVMSG": -- cgit v1.2.3