Ejemplo n.º 1
0
def cron_completion_at_time_cb(data, completion_item, buffer, completion):
    """ Complete with time, for command '/at'. """
    weechat.hook_completion_list_add(completion, "+5m",
                                     0, weechat.WEECHAT_LIST_POS_END)
    weechat.hook_completion_list_add(completion, "20:00",
                                     0, weechat.WEECHAT_LIST_POS_END)
    return weechat.WEECHAT_RC_OK
Ejemplo n.º 2
0
def docgen_completion_cb(data, completion_item, buffer, completion):
    """Callback for completion."""
    global locale_list
    for locale in locale_list:
        weechat.hook_completion_list_add(completion, locale, 0,
                                         weechat.WEECHAT_LIST_POS_SORT)
    return weechat.WEECHAT_RC_OK
Ejemplo n.º 3
0
def nicklist(data, completion_item, buffer, completion):
    '''Completion for /sn'''

    if weechat.buffer_get_string(buffer, 'name') == weechat.config_get_plugin('channel'):
        for username in users:
            weechat.hook_completion_list_add(completion, username, 1, weechat.WEECHAT_LIST_POS_SORT)
    return weechat.WEECHAT_RC_OK
Ejemplo n.º 4
0
def bas_completion_current_buffer_cb(data, completion_item, buffer, completion):
    """ Complete with current buffer name (plugin.name), for command '/autosetbuffer'. """
    name = "%s.%s" % (weechat.buffer_get_string(buffer, "plugin"),
                      weechat.buffer_get_string(buffer, "name"))
    weechat.hook_completion_list_add(completion, name,
                                     0, weechat.WEECHAT_LIST_POS_BEGINNING)
    return weechat.WEECHAT_RC_OK
Ejemplo n.º 5
0
def completion_cb(replacer_obj, data, completion_item, weechat_buffer,
                  completion):
    """Complete keys from replacement table for add/del command"""
    for key in replacer_obj.replacement_map:
        weechat.hook_completion_list_add(completion, key.encode('utf-8'), 0,
                                         weechat.WEECHAT_LIST_POS_SORT)
    return weechat.WEECHAT_RC_OK
Ejemplo n.º 6
0
def policy_completion_cb(data, completion_item, buf, completion):
    """Callback for policy tab completion."""
    for policy in POLICIES:
        weechat.hook_completion_list_add(
            completion, policy, 0, weechat.WEECHAT_LIST_POS_SORT)

    return weechat.WEECHAT_RC_OK
Ejemplo n.º 7
0
def cron_completion_keyword_cb(data, completion_item, buffer, completion):
    """ Complete with cron keyword, for command '/cron'. """
    global cron_commands
    for command in sorted(cron_commands.keys()):
        weechat.hook_completion_list_add(completion, command,
                                         0, weechat.WEECHAT_LIST_POS_END)
    return weechat.WEECHAT_RC_OK
Ejemplo n.º 8
0
def completion_urls_cb(data, completion_item, bufferp, completion):
    """ Complete with URLS, for command '/url'. """
    global urlGrab
    bufferd = hashBufferName( bufferp)
    for url in urlGrab.globalUrls :
        if url['buffer'] == bufferd:
            weechat.hook_completion_list_add(completion, url['url'], 0, weechat.WEECHAT_LIST_POS_SORT)
    return weechat.WEECHAT_RC_OK
Ejemplo n.º 9
0
def completion_cb(data, completion_item, buf, completion):
    """Completion callback."""
    check(data == 'completion_data')
    check(completion_item == 'SCRIPT_NAME')
    check(weechat.hook_completion_get_string(completion, 'args') == 'w')
    weechat.hook_completion_list_add(completion, 'word_completed',
                                     0, weechat.WEECHAT_LIST_POS_END)
    return weechat.WEECHAT_RC_OK
Ejemplo n.º 10
0
def wg_completion_scripts_cb(data, completion_item, buffer, completion):
    """ Complete with known script names, for command '/weeget'. """
    global wg_scripts
    wg_read_scripts(download_list=False)
    if len(wg_scripts) > 0:
        for id, script in wg_scripts.iteritems():
            weechat.hook_completion_list_add(completion, script["full_name"], 0, weechat.WEECHAT_LIST_POS_SORT)
    return weechat.WEECHAT_RC_OK
Ejemplo n.º 11
0
def cron_completion_number_cb(data, completion_item, buffer, completion):
    """ Complete with jobs numbers, for command '/cron'. """
    global crontab
    if len(crontab) > 0:
        for i in reversed(range(0, len(crontab))):
            weechat.hook_completion_list_add(completion, "%d" % (i + 1),
                                             0, weechat.WEECHAT_LIST_POS_BEGINNING)
    return weechat.WEECHAT_RC_OK
Ejemplo n.º 12
0
def whitelist_completion_sections(userdata, completion_item, buf, completion):
    """Add hooks for whitelist completion."""
    for section in SCRIPT_CONFIG['whitelists']:
        weechat.hook_completion_list_add(
            completion,
            section,
            0,
            weechat.WEECHAT_LIST_POS_SORT)
    return weechat.WEECHAT_RC_OK
Ejemplo n.º 13
0
def bas_completion_options_cb(data, completion_item, buffer, completion):
    """ Complete with config options, for command '/autosetbuffer'. """
    options = weechat.infolist_get("option", "", "%s.buffer.*" % CONFIG_FILE_NAME)
    if options:
        while weechat.infolist_next(options):
            weechat.hook_completion_list_add(
                completion, weechat.infolist_string(options, "option_name"), 0, weechat.WEECHAT_LIST_POS_SORT
            )
        weechat.infolist_free(options)
    return weechat.WEECHAT_RC_OK
Ejemplo n.º 14
0
def wg_completion_scripts_installed_cb(data, completion_item, buffer, completion):
    """ Complete with names of scripts installed, for command '/weeget'. """
    global wg_scripts
    wg_read_scripts(download_list=False)
    if len(wg_scripts) > 0:
        for id, script in wg_scripts.iteritems():
            status = wg_get_local_script_status(script)
            if status["installed"]:
                weechat.hook_completion_list_add(completion, script["full_name"], 0, weechat.WEECHAT_LIST_POS_SORT)
    return weechat.WEECHAT_RC_OK
Ejemplo n.º 15
0
def wg_completion_scripts_tags_cb(data, completion_item, buffer, completion):
    """ Complete with known tags, for command '/weeget'. """
    global wg_scripts
    wg_read_scripts(download_list=False)
    if len(wg_scripts) > 0:
        for id, script in wg_scripts.iteritems():
            if script["tags"]:
                for tag in script["tags"].split(","):
                    weechat.hook_completion_list_add(completion, tag, 0, weechat.WEECHAT_LIST_POS_SORT)
    return weechat.WEECHAT_RC_OK
Ejemplo n.º 16
0
def bas_completion_current_buffer_cb(data, completion_item, buffer,
                                     completion):
    """
    Complete with current buffer name (plugin.name),
    for command '/autosetbuffer'.
    """
    name = "%s.%s" % (weechat.buffer_get_string(
        buffer, "plugin"), weechat.buffer_get_string(buffer, "name"))
    weechat.hook_completion_list_add(completion, name, 0,
                                     weechat.WEECHAT_LIST_POS_BEGINNING)
    return weechat.WEECHAT_RC_OK
Ejemplo n.º 17
0
def bas_completion_options_cb(data, completion_item, buffer, completion):
    """ Complete with config options, for command '/autosetbuffer'. """
    options = weechat.infolist_get("option", "",
                                   "%s.buffer.*" % CONFIG_FILE_NAME)
    if options:
        while weechat.infolist_next(options):
            weechat.hook_completion_list_add(
                completion, weechat.infolist_string(options, "option_name"), 0,
                weechat.WEECHAT_LIST_POS_SORT)
        weechat.infolist_free(options)
    return weechat.WEECHAT_RC_OK
Ejemplo n.º 18
0
def wg_completion_scripts_tags_cb(data, completion_item, buffer, completion):
    """ Complete with known tags, for command '/weeget'. """
    global wg_scripts
    wg_read_scripts(download_list=False)
    if len(wg_scripts) > 0:
        for id, script in wg_scripts.items():
            if script["tags"]:
                for tag in script["tags"].split(","):
                    weechat.hook_completion_list_add(completion, tag,
                                                     0, weechat.WEECHAT_LIST_POS_SORT)
    return weechat.WEECHAT_RC_OK
Ejemplo n.º 19
0
def complete(data, completion_item, buffer, completion):
    weechat.prnt('', 'printo json')
    changes = get_config_json('changes')
    weechat.prnt('', str(changes))
    users = get_users_in_cb()
    weechat.prnt('', str(users))
    for old, new in changes.items():
        if old in users:
            weechat.hook_completion_list_add(completion, new.encode('utf-8'),
                                             0, weechat.WEECHAT_LIST_POS_SORT)
    return weechat.WEECHAT_RC_OK
Ejemplo n.º 20
0
def wg_completion_scripts_installed_cb(data, completion_item, buffer, completion):
    """ Complete with names of scripts installed, for command '/weeget'. """
    global wg_scripts
    wg_read_scripts(download_list=False)
    if len(wg_scripts) > 0:
        for id, script in wg_scripts.iteritems():
            status = wg_get_local_script_status(script)
            if status["installed"]:
                weechat.hook_completion_list_add(completion, script["full_name"],
                                                 0, weechat.WEECHAT_LIST_POS_SORT)
    return weechat.WEECHAT_RC_OK
Ejemplo n.º 21
0
Archivo: cron.py Proyecto: kevr/scripts
def cron_completion_commands_cb(data, completion_item, buffer, completion):
    """ Complete with commands, for command '/cron'. """
    infolist = weechat.infolist_get("hook", "command", "")
    while weechat.infolist_next(infolist):
        command = weechat.infolist_string(infolist, "command")
        if command.startswith("/"):
            command = command[1:]
        if command:
            weechat.hook_completion_list_add(completion, "/%s" % command,
                                             0, weechat.WEECHAT_LIST_POS_SORT)
    weechat.infolist_free(infolist)
    return weechat.WEECHAT_RC_OK
Ejemplo n.º 22
0
def cron_completion_commands_cb(data, completion_item, buffer, completion):
    """ Complete with commands, for command '/cron'. """
    infolist = weechat.infolist_get("hook", "command", "")
    while weechat.infolist_next(infolist):
        command = weechat.infolist_string(infolist, "command")
        if command.startswith("/"):
            command = command[1:]
        if command:
            weechat.hook_completion_list_add(completion, "/%s" % command,
                                             0, weechat.WEECHAT_LIST_POS_SORT)
    weechat.infolist_free(infolist)
    return weechat.WEECHAT_RC_OK
Ejemplo n.º 23
0
def jmh_completion_servers(data, completion_item, buffer, completion):
    """ Completion with jabber server names. """
    infolist = weechat.infolist_get('buffer','','')
    j_re = re.compile(r'^jabber.server')
    while weechat.infolist_next(infolist):
        buffer_name = weechat.infolist_string(infolist, 'name')
        if j_re.match(buffer_name):
            # Example buffer_name = 'jabber.server.gtalk'
            names = buffer_name.split('.')
            if len(names) < 3:
                continue
            weechat.hook_completion_list_add(completion, name[2],
                                       0, weechat.WEECHAT_LIST_POS_SORT)
    weechat.infolist_free(infolist)
    return weechat.WEECHAT_RC_OK
Ejemplo n.º 24
0
def bitlbee_completion(data, completion_item, buffer, completion):
    """
    Complete bitlbee commands only in the bitlbee buffer
    """

    server = OPTS["server"]
    channel = OPTS["channel"]
    if not server or not channel:
        return weechat.WEECHAT_RC_OK

    buff_name = weechat.buffer_get_string(buffer, "name")
    if buff_name == "%s.%s" % (server, channel):
        for command in commands:
            weechat.hook_completion_list_add(completion, command, 0,
                                             weechat.WEECHAT_LIST_POS_SORT)
    return weechat.WEECHAT_RC_OK
Ejemplo n.º 25
0
def wee_ns_hook_completion_send(data, completion_item,
                                buffer, completion):
    if server.is_connected:
        [weechat.hook_completion_list_add(completion, contact, 0,
                                          weechat.WEECHAT_LIST_POS_SORT)
         for contact, fds in server.contacts.items() if fds]
    return weechat.WEECHAT_RC_OK
Ejemplo n.º 26
0
def bitlbee_completion(data, completion_item, buffer, completion):
    """
    Complete bitlbee commands only in the bitlbee buffer
    """

    server = OPTS["server"]
    channel = OPTS["channel"]
    if not server or not channel:
        return weechat.WEECHAT_RC_OK

    buff_name = weechat.buffer_get_string(buffer, "name")
    if buff_name == "%s.%s" % (server, channel):
        for command in commands:
            weechat.hook_completion_list_add(completion, command, 0,
                                             weechat.WEECHAT_LIST_POS_SORT)
    return weechat.WEECHAT_RC_OK
Ejemplo n.º 27
0
def completer(data, completion_item, buffer, completion):
    channel = weechat.buffer_get_string(buffer, 'localvar_channel')
    if not weechat.info_get('irc_is_channel', channel):
        return WEECHAT_RC_OK

    server = weechat.buffer_get_string(buffer, 'localvar_server')
    input = weechat.buffer_get_string(buffer, 'input')
    type = input.split()[2]
    patterns = get_patterns_in_config('%s.%s.%s' %(server, channel, type))

    if not patterns:
        return WEECHAT_RC_OK

    for mask in patterns[(server, channel)][type]:
        weechat.hook_completion_list_add(completion, mask, 0, weechat.WEECHAT_LIST_POS_END)

    return WEECHAT_RC_OK
Ejemplo n.º 28
0
def wee_ns_hook_completion_send(data, completion_item, buffer, completion):
    if server.is_connected:
        [
            weechat.hook_completion_list_add(completion, contact, 0,
                                             weechat.WEECHAT_LIST_POS_SORT)
            for contact, fds in server.contacts.items() if fds
        ]
    return weechat.WEECHAT_RC_OK
Ejemplo n.º 29
0
def nameday_completion_namedays_cb(data, completion_item, buffer, completion):
    """Complete with name days, for command '/nameday'."""
    global namedays
    country = nameday_get_country()
    for names in namedays[country]:
        for string in names:
            pos = string.find('(')
            if pos > 0:
                string = string[0:pos].strip()
            for name in string.split(','):
                name2 = nameday_decode(name, gender=False, colorMale='', colorFemale='')
                weechat.hook_completion_list_add(completion,
                                                 name2,
                                                 0, weechat.WEECHAT_LIST_POS_SORT)
                weechat.hook_completion_list_add(completion,
                                                 nameday_remove_accents(name2),
                                                 0, weechat.WEECHAT_LIST_POS_SORT)
    return weechat.WEECHAT_RC_OK
Ejemplo n.º 30
0
def complete_mention(data, item, buffer, completion):
    input = decode(weechat.buffer_get_string(buffer, 'input')).split(' ')
    word = input[-1]
    if not word.startswith('@'):
        return weechat.WEECHAT_RC_OK

    search = word[1:]

    nicklist = weechat.infolist_get('nicklist', buffer, '')
    while weechat.infolist_next(nicklist):
        name = weechat.infolist_string(nicklist, 'name')
        if '|' in name:
            continue
        visible = weechat.infolist_integer(nicklist, 'visible')
        if not visible:
            continue

        if name.lower().startswith(search.lower()):
            c = '@{name}{colon}'.format(name=name, colon=':' if len(input) == 1 else '')
            weechat.hook_completion_list_add(completion, c, 0, weechat.WEECHAT_LIST_POS_SORT)

    return weechat.WEECHAT_RC_OK
Ejemplo n.º 31
0
def autojoinem_completion_cb(data, completion_item, buffer, completion):
#    server = weechat.buffer_get_string(buffer, 'localvar_server')                               # current buffer
    input_line = weechat.buffer_get_string(buffer, 'input')

    # get information out of the input_line
    argv = input_line.strip().split(" ",3)
    if (len(argv) >= 3 and argv[1] == 'del'):
        server = argv[2]

    list_of_channels,list_of_keys = get_autojoin_list(buffer,server)
    if list_of_channels == 1:
        return weechat.WEECHAT_RC_OK

    if (len(argv) >= 4 and argv[1] == 'del'):
        list_of_current_channels = argv[3].split(' ')
        missing_channels = get_difference(list_of_channels,list_of_current_channels)
        if not missing_channels:
            return weechat.WEECHAT_RC_OK
        list_of_channels = missing_channels

    for i, elem in enumerate(list_of_channels):
        weechat.hook_completion_list_add(completion, list_of_channels[i], 0, weechat.WEECHAT_LIST_POS_END)
    return weechat.WEECHAT_RC_OK
Ejemplo n.º 32
0
Archivo: cron.py Proyecto: kevr/scripts
def cron_completion_buffer_cb(data, completion_item, buffer, completion):
    """ Complete with buffer, for command '/cron'. """
    infolist = weechat.infolist_get("buffer", "", "")
    while weechat.infolist_next(infolist):
        plugin_name = weechat.infolist_string(infolist, "plugin_name")
        name = weechat.infolist_string(infolist, "name")
        weechat.hook_completion_list_add(completion,
                                         "%s.%s" % (plugin_name, name),
                                         0, weechat.WEECHAT_LIST_POS_SORT)
    weechat.infolist_free(infolist)
    weechat.hook_completion_list_add(completion, "current",
                                     0, weechat.WEECHAT_LIST_POS_BEGINNING)
    weechat.hook_completion_list_add(completion, "core.weechat",
                                     0, weechat.WEECHAT_LIST_POS_BEGINNING)
    return weechat.WEECHAT_RC_OK
Ejemplo n.º 33
0
def cron_completion_buffer_cb(data, completion_item, buffer, completion):
    """ Complete with buffer, for command '/cron'. """
    infolist = weechat.infolist_get("buffer", "", "")
    while weechat.infolist_next(infolist):
        plugin_name = weechat.infolist_string(infolist, "plugin_name")
        name = weechat.infolist_string(infolist, "name")
        weechat.hook_completion_list_add(completion,
                                         "%s.%s" % (plugin_name, name),
                                         0, weechat.WEECHAT_LIST_POS_SORT)
    weechat.infolist_free(infolist)
    weechat.hook_completion_list_add(completion, "current",
                                     0, weechat.WEECHAT_LIST_POS_BEGINNING)
    weechat.hook_completion_list_add(completion, "core.weechat",
                                     0, weechat.WEECHAT_LIST_POS_BEGINNING)
    return weechat.WEECHAT_RC_OK
Ejemplo n.º 34
0
def rlayout_completion_bool_cb(data, completion_item, buffer, completion):
    for bool in ("on", "off"):
        weechat.hook_completion_list_add(completion, bool, 0,
                                         weechat.WEECHAT_LIST_POS_SORT)
    return weechat.WEECHAT_RC_OK
Ejemplo n.º 35
0
def customize_bar_completion_cb(data, completion_item, buffer, completion):
    for option in list(OPTIONS.keys()):
        option = option.split('.')
        weechat.hook_completion_list_add(completion, option[1], 0,
                                         weechat.WEECHAT_LIST_POS_SORT)
    return weechat.WEECHAT_RC_OK
Ejemplo n.º 36
0
def rlayout_completion_layout_list_cb(data, completion_item, buffer,
                                      completion):
    for rlayout in rlayouts_list():
        weechat.hook_completion_list_add(completion, rlayout, 0,
                                         weechat.WEECHAT_LIST_POS_SORT)
    return weechat.WEECHAT_RC_OK
Ejemplo n.º 37
0
def warn_cmpl(data, completion_item, buffer, completion):
    for mask in warnDB:
        weechat.hook_completion_list_add(completion, mask, 0,
                                         weechat.WEECHAT_LIST_POS_END)
    return WEECHAT_RC_OK
Ejemplo n.º 38
0
def emoji_completion_cb(data, completion_item, buffer, completion):
    for key in EMOJI:
        weechat.hook_completion_list_add(completion, ":%s:" % key, 0, weechat.WEECHAT_LIST_POS_SORT)
    return weechat.WEECHAT_RC_OK
Ejemplo n.º 39
0
def completion_log_files(data, completion_item, buffer, completion):
    global home_dir
    for log in dir_list(home_dir):
        weechat.hook_completion_list_add(completion, log[len(home_dir):], 0,
                                         weechat.WEECHAT_LIST_POS_SORT)
    return WEECHAT_RC_OK
Ejemplo n.º 40
0
def docgen_completion_cb(data, completion_item, buf, completion):
    """Callback for completion."""
    for locale in LOCALE_LIST:
        weechat.hook_completion_list_add(completion, locale, 0,
                                         weechat.WEECHAT_LIST_POS_SORT)
    return weechat.WEECHAT_RC_OK
Ejemplo n.º 41
0
def completion_keys(data, completion_item, buffer, completion):
    global replace_table
    for k in replace_table:
        weechat.hook_completion_list_add(completion, encode(k), 0, weechat.WEECHAT_LIST_POS_SORT)
    return WEECHAT_RC_OK
Ejemplo n.º 42
0
def nicklist(data, completion_item, buffer, completion):
    """Completion for /sn"""
    for username, properties in users.iteritems():
        weechat.hook_completion_list_add(completion, username, 0,
                                         weechat.WEECHAT_LIST_POS_SORT)
    return weechat.WEECHAT_RC_OK
Ejemplo n.º 43
0
def completion_egrep_args(data, completion_item, buffer, completion):
    for arg in ('count', 'all', 'matchcase', 'hilight', 'exact', 'head',
                'tail', 'number', 'buffer'):
        weechat.hook_completion_list_add(completion, '--' + arg, 0,
                                         weechat.WEECHAT_LIST_POS_SORT)
    return WEECHAT_RC_OK
Ejemplo n.º 44
0
def force_nick_colors_completion_cb(data, completion_item, buffer, completion):
    create_list()
#    for nick,color in colored_nicks.items():
    for nick,color in list(colored_nicks.items()):
        weechat.hook_completion_list_add(completion, nick, 0, weechat.WEECHAT_LIST_POS_SORT)
    return weechat.WEECHAT_RC_OK
Ejemplo n.º 45
0
def nick_colors_completion_cb(data, completion_item, buffer, completion):
#    for id,color in DEFAULT_COLORS.items():
    for id,color in list(DEFAULT_COLORS.items()):
        weechat.hook_completion_list_add(completion, color, 0, weechat.WEECHAT_LIST_POS_SORT)
    return weechat.WEECHAT_RC_OK
Ejemplo n.º 46
0
def add_completions(completion, words):
	for word in words:
		weechat.hook_completion_list_add(completion, word, 0, weechat.WEECHAT_LIST_POS_END)
Ejemplo n.º 47
0
def cmpl_infos_list(data, completion_item, buffer, completion):
    for name in get_infos_list():
        weechat.hook_completion_list_add(completion, name, 0,
                                         weechat.WEECHAT_LIST_POS_END)
    return WEECHAT_RC_OK
Ejemplo n.º 48
0
def kwfactoids_completion_cb(data, completion_item, buffer, completion):
    """Add completion for factoids."""
    for factoid in FACTOIDS:
        weechat.hook_completion_list_add(completion, factoid, 0,
                                         weechat.WEECHAT_LIST_POS_SORT)
    return weechat.WEECHAT_RC_OK
Ejemplo n.º 49
0
Archivo: cron.py Proyecto: kevr/scripts
def cron_completion_repeat_cb(data, completion_item, buffer, completion):
    """ Complete with repeat, for command '/cron'. """
    weechat.hook_completion_list_add(completion, "*",
                                     0, weechat.WEECHAT_LIST_POS_BEGINNING)
    return weechat.WEECHAT_RC_OK
Ejemplo n.º 50
0
def docgen_completion_cb(data, completion_item, buf, completion):
    """Callback for completion."""
    for locale in LOCALE_LIST:
        weechat.hook_completion_list_add(completion, locale, 0,
                                         weechat.WEECHAT_LIST_POS_SORT)
    return weechat.WEECHAT_RC_OK
Ejemplo n.º 51
0
#
# Author: Sébastien Helleu <*****@*****.**>
#
"""A WeeChat script."""

import weechat

if __name__ == '__main__':
    if weechat.register('script', 'author', '0.1', 'GPL3', 'desc', '', ''):
        weechat.hook_completion_list_add('0x123abc', 'word', 0,
                                         weechat.WEECHAT_LIST_POS_SORT)
Ejemplo n.º 52
0
def urlbar_completion_urls_cb(data, completion_item, buffer, completion):
    """ Complete with URLS, for command '/url'. """
    for url in urls:
        weechat.hook_completion_list_add(completion, url.url, 0,
                                         weechat.WEECHAT_LIST_POS_SORT)
    return weechat.WEECHAT_RC_OK
Ejemplo n.º 53
0
def server_completion_cb(data, completion_item, buffer, completion):
    """ Enabled or disabled server completion callback. """
    print_debug("completion " + ', '.join(globals()[data]()))
    for server in globals()[data]():
        weechat.hook_completion_list_add(completion, server, 0, weechat.WEECHAT_LIST_POS_SORT)
    return weechat.WEECHAT_RC_OK
Ejemplo n.º 54
0
def completion_keys(data, completion_item, buffer, completion):
    global replace_table
    for k in replace_table:
        weechat.hook_completion_list_add(completion, encode(k), 0,
                                         weechat.WEECHAT_LIST_POS_SORT)
    return WEECHAT_RC_OK
Ejemplo n.º 55
0
def emoji_completion_cb(data, completion_item, buffer, completion):
    for key in EMOJI:
        weechat.hook_completion_list_add(completion, ":%s:" % key, 0, weechat.WEECHAT_LIST_POS_SORT)
    return weechat.WEECHAT_RC_OK