예제 #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))