module.plugins.Hook.Hook
class module.plugins.Hook.
Hook(core, manager)
Base class for hook plugins.
__init__
(core, manager)
The whole SourceCode can be found here: (SourceCode)
Methods
Name | Description |
---|---|
__init__ (core, manager) |
|
afterReconnecting (ip) |
|
beforeReconnecting (ip) |
|
captchaCorrect (task) |
|
captchaInvalid (task) |
|
coreExiting () |
|
coreReady () |
|
delStorage (key) |
Delete entry in db |
downloadFailed (pyfile) |
|
downloadFinished (pyfile) |
|
downloadPreparing (pyfile) |
|
getConf (option) |
see getConfig |
getConfig (option) |
Returns config value for current plugin |
getStorage ([key, default]) |
Retrieves saved value or dict of all saved entries if key is None |
initPeriodical () |
|
isActivated () |
checks if hook is activated |
logDebug (*args) |
|
logError (*args) |
|
logInfo (*args) |
|
logWarning (*args) |
|
newCaptchaTask (task) |
new captcha task for the plugin, it MUST set the handler and timeout or will be ignored |
packageFinished (pypack) |
|
periodical () |
|
retrieve (*args, **kwargs) |
same as getStorage |
setConf (option, value) |
see setConfig |
setConfig (option, value) |
Set config value for current plugin |
setStorage (key, value) |
Saves a value persistently to the database |
setup () |
more init stuff if needed |
store (key, value) |
same as setStorage |
unload () |
called when hook was deactivated |
The whole SourceCode can be found here: (SourceCode)
####Attributes
event_list
event_map
interval
int(x=0) -> int or long
####interval
= 60
periodic call interval in seconds
####info
= None
Provide information in dict here, usable by API getInfo
####cb
= None
Callback of periodical job task, used by hookmanager
####manager
= None
HookManager
####event_map
= None
automatically register event listeners for functions, attribute will be deleted dont use it yourself
####event_list
= None
List of events the plugin can handle, name the functions exactly like eventname.
####setup
()
more init stuff if needed
####unload
()
called when hook was deactivated
####isActivated
()
checks if hook is activated
####newCaptchaTask
(task)
new captcha task for the plugin, it MUST set the handler and timeout or will be ignored
This page may no longer be valid. If you find something wrong, please report it.