summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
Diffstat (limited to 'module')
-rw-r--r--module/plugins/Hook.py12
-rw-r--r--module/plugins/captcha/NetloadIn.py4
2 files changed, 14 insertions, 2 deletions
diff --git a/module/plugins/Hook.py b/module/plugins/Hook.py
index 35be45b30..41264e559 100644
--- a/module/plugins/Hook.py
+++ b/module/plugins/Hook.py
@@ -41,10 +41,20 @@ class Hook():
self.setup()
def setup(self):
+ """ more init stuff if needed"""
pass
def isActivated(self):
- return self.config["activated"]
+ """ checks if hook is activated"""
+ return self.config.getPlugin(self.__name__, "activated")
+
+ def getConfig(self, option):
+ """ gets config values """
+ return self.plugin.getPlugin(self.__name__, option)
+
+ def setConfig(self, option, value):
+ """ sets config value """
+ self.plugin.setPlugin(self.__name__, option, value)
def coreReady(self):
pass
diff --git a/module/plugins/captcha/NetloadIn.py b/module/plugins/captcha/NetloadIn.py
index c99a0744c..75f3f2e8b 100644
--- a/module/plugins/captcha/NetloadIn.py
+++ b/module/plugins/captcha/NetloadIn.py
@@ -10,7 +10,9 @@ class NetloadIn(OCR):
self.clean(3)
self.clean(3)
self.run_tesser(True, True, False, False)
-
+
+ self.result_captcha = self.result_captcha.replace(" ", "")[:4] # cut to 4 numbers
+
return self.result_captcha
if __name__ == '__main__':