void
weechat_aspell_completion_init ()
{
    weechat_hook_completion ("aspell_langs",
                             N_("list of all languages supported by aspell"),
                             &weechat_aspell_completion_langs_cb, NULL, NULL);
    weechat_hook_completion ("aspell_dicts",
                             N_("list of aspell installed dictionaries"),
                             &weechat_aspell_completion_dicts_cb, NULL, NULL);
}
示例#2
0
void
relay_completion_init ()
{
    weechat_hook_completion ("relay_protocol_name",
                             N_("all possible protocol.name for relay plugin"),
                             &relay_completion_protocol_name_cb, NULL);
    weechat_hook_completion ("relay_relays",
                             N_("protocol.name of current relays for relay "
                                "plugin"),
                             &relay_completion_relays_cb, NULL);
    weechat_hook_completion ("relay_free_port",
                             N_("first free port for relay plugin"),
                             &relay_completion_free_port_cb, NULL);
}
示例#3
0
void
exec_completion_init ()
{
    weechat_hook_completion ("exec_commands_ids",
                             N_("ids (numbers and names) of executed commands"),
                             &exec_completion_commands_ids_cb, NULL, NULL);
}
示例#4
0
void
xfer_completion_init ()
{
    weechat_hook_completion ("nick",
                             N_("nicks of DCC chat"),
                             &xfer_completion_nick_cb, NULL, NULL);
}
示例#5
0
void
fset_completion_init ()
{
    weechat_hook_completion ("fset_options",
                             N_("configuration files, sections, options and "
                                "words of options"),
                             &fset_completion_option_cb, NULL, NULL);
}
示例#6
0
int
weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
{
    /* make C compiler happy */
    (void) argc;
    (void) argv;
    
    weechat_plugin = plugin;
    
    if (!weechat_aspell_config_init ())
        return WEECHAT_RC_ERROR;
    
    if (weechat_aspell_config_read () < 0)
        return WEECHAT_RC_ERROR;
    
    /* command /aspell */
    weechat_hook_command ("aspell",
                          N_("aspell plugin configuration"),
                          N_("dictlist | enable lang | disable | "
                             "addword [lang] word"),
                          N_("dictlist: show installed dictionaries\n"
                             "  enable: enable aspell on current buffer\n"
                             " disable: disable aspell on current buffer\n"
                             " addword: add a word in your personal aspell "
                             "dictionary\n"
                             "\n"
                             "Input line beginning with a '/' is not checked, "
                             "except for some commands."),
                          "dictlist"
                          " || enable %(aspell_langs)"
                          " || disable"
                          " || addword",
                          &weechat_aspell_command_cb, NULL);
    weechat_hook_completion ("aspell_langs",
                             N_("list of supported langs for aspell"),
                             &weechat_aspell_completion_langs_cb, NULL);
    
    /* callback for buffer_switch */
    weechat_hook_signal ("buffer_switch",
                         &weechat_aspell_buffer_switch_cb, NULL);
    
    /* callback for spell checking input text */
    weechat_hook_modifier ("input_text_display",
                           &weechat_aspell_modifier_cb, NULL);
    
    weechat_aspell_create_spellers (weechat_current_buffer ());
    
    return WEECHAT_RC_OK;
}
示例#7
0
int
weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
{
    /* make C compiler happy */
    (void) argc;
    (void) argv;

    weechat_plugin = plugin;

    if (!weechat_aspell_config_init ())
        return WEECHAT_RC_ERROR;

    if (weechat_aspell_config_read () < 0)
        return WEECHAT_RC_ERROR;

    /* command /aspell */
    weechat_hook_command ("aspell",
                          N_("aspell plugin configuration"),
                          N_("enable|disable|toggle"
                             " || listdict"
                             " || setdict <lang>"
                             " || deldict"
                             " || addword [<lang>] <word>"),
                          N_("  enable: enable aspell\n"
                             " disable: disable aspell\n"
                             "  toggle: toggle aspell\n"
                             "listdict: show installed dictionaries\n"
                             " setdict: set dictionary for current buffer\n"
                             " deldict: delete dictionary used on current "
                             "buffer\n"
                             " addword: add a word in personal aspell "
                             "dictionary\n"
                             "\n"
                             "Input line beginning with a '/' is not checked, "
                             "except for some commands (see /set "
                             "aspell.check.commands).\n\n"
                             "To enable aspell on all buffers, use option "
                             "\"default_dict\", then enable aspell, for "
                             "example:\n"
                             "  /set aspell.check.default_dict \"en\"\n"
                             "  /aspell enable\n\n"
                             "Default key to toggle aspell is alt-s."),
                          "enable"
                          " || disable"
                          " || toggle"
                          " || listdict"
                          " || setdict %(aspell_langs)"
                          " || deldict"
                          " || addword",
                          &weechat_aspell_command_cb, NULL);
    weechat_hook_completion ("aspell_langs",
                             N_("list of supported langs for aspell"),
                             &weechat_aspell_completion_langs_cb, NULL);

    /*
     * callback for spell checking input text
     * we use a low priority here, so that other modifiers "input_text_display"
     * (from other plugins) will be called before this one
     */
    weechat_hook_modifier ("500|input_text_display",
                           &weechat_aspell_modifier_cb, NULL);

    return WEECHAT_RC_OK;
}
示例#8
0
void
rmodifier_completion_init ()
{
    weechat_hook_completion ("rmodifier", N_("list of rmodifiers"),
                             &rmodifier_completion_cb, NULL);
}
示例#9
0
void
irc_completion_init ()
{
    weechat_hook_completion ("irc_server",
                             N_("current IRC server"),
                             &irc_completion_server_cb, NULL, NULL);
    weechat_hook_completion ("irc_server_nick",
                             N_("nick on current IRC server"),
                             &irc_completion_server_nick_cb, NULL, NULL);
    weechat_hook_completion ("irc_server_channels",
                             N_("channels on current IRC server"),
                             &irc_completion_server_channels_cb, NULL, NULL);
    weechat_hook_completion ("irc_server_privates",
                             N_("privates on current IRC server"),
                             &irc_completion_server_privates_cb, NULL, NULL);
    weechat_hook_completion ("irc_server_nicks",
                             N_("nicks on all channels of current IRC server"),
                             &irc_completion_server_nicks_cb, NULL, NULL);
    weechat_hook_completion ("irc_servers",
                             N_("IRC servers (internal names)"),
                             &irc_completion_servers_cb, NULL, NULL);
    weechat_hook_completion ("irc_channel",
                             N_("current IRC channel"),
                             &irc_completion_channel_cb, NULL, NULL);
    weechat_hook_completion ("nick",
                             N_("nicks of current IRC channel"),
                             &irc_completion_channel_nicks_cb, NULL, NULL);
    weechat_hook_completion ("irc_channel_nicks_hosts",
                             N_("nicks and hostnames of current IRC channel"),
                             &irc_completion_channel_nicks_hosts_cb, NULL, NULL);
    weechat_hook_completion ("irc_modelist_masks",
                             N_("modelist masks of current IRC channel; "
                                "required argument: modelist mode"),
                             &irc_completion_modelist_masks_cb, NULL, NULL);
    weechat_hook_completion ("irc_modelist_numbers",
                             N_("modelist numbers of current IRC channel; "
                                "required argument: modelist mode"),
                             &irc_completion_modelist_numbers_cb, NULL, NULL);
    weechat_hook_completion ("irc_channel_topic",
                             N_("topic of current IRC channel"),
                             &irc_completion_channel_topic_cb, NULL, NULL);
    weechat_hook_completion ("irc_channels",
                             N_("channels on all IRC servers"),
                             &irc_completion_channels_cb, NULL, NULL);
    weechat_hook_completion ("irc_privates",
                             N_("privates on all IRC servers"),
                             &irc_completion_privates_cb, NULL, NULL);
    weechat_hook_completion ("irc_msg_kick",
                             N_("default kick message"),
                             &irc_completion_msg_kick_cb, NULL, NULL);
    weechat_hook_completion ("irc_msg_part",
                             N_("default part message for IRC channel"),
                             &irc_completion_msg_part_cb, NULL, NULL);
    weechat_hook_completion ("irc_ignores_numbers",
                             N_("numbers for defined ignores"),
                             &irc_completion_ignores_numbers_cb, NULL, NULL);
    weechat_hook_completion ("irc_notify_nicks",
                             N_("nicks in notify list"),
                             &irc_completion_notify_nicks_cb, NULL, NULL);
}