def _on_server_attrs_hook(word, word_eol, attrs, userdata): hook = ffi.from_handle(userdata) word = create_wordlist(word) word_eol = create_wordlist(word_eol) attr = Attribute() attr.time = attrs.server_time_utc return to_cb_ret(hook.callback(word, word_eol, hook.userdata, attr))
def _on_server_attrs_hook(word, word_eol, attrs, userdata): hook = ffi.from_handle(userdata) word = create_wordlist(word) word_eol = create_wordlist(word_eol) attr = Attribute() attr.time = attrs.server_time_utc return to_cb_ret(hook.callback(word, word_eol, hook.userdata, attr))
def _on_timer_hook(userdata): hook = ffi.from_handle(userdata) if hook.callback(hook.userdata) is True: return 1 else: hook.is_unload = True # Don't unhook for h in hook.plugin.hooks: if h == hook: hook.plugin.hooks.remove(h) break return 0
def _on_timer_hook(userdata): hook = ffi.from_handle(userdata) if hook.callback(hook.userdata) is True: return 1 else: hook.is_unload = True # Don't unhook for h in hook.plugin.hooks: if h == hook: hook.plugin.hooks.remove(h) break return 0
def _on_server_hook(word, word_eol, userdata): hook = ffi.from_handle(userdata) word = create_wordlist(word) word_eol = create_wordlist(word_eol) return to_cb_ret(hook.callback(word, word_eol, hook.userdata))
def _on_server_hook(word, word_eol, userdata): hook = ffi.from_handle(userdata) word = create_wordlist(word) word_eol = create_wordlist(word_eol) return to_cb_ret(hook.callback(word, word_eol, hook.userdata))