コード例 #1
0
ファイル: python.py プロジェクト: hexchat/hexchat
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))
コード例 #2
0
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))
コード例 #3
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
コード例 #4
0
ファイル: python.py プロジェクト: blat/hexchat
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
コード例 #5
0
ファイル: python.py プロジェクト: hexchat/hexchat
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))
コード例 #6
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))