コード例 #1
0
void
alias_info_init ()
{
    dogechat_hook_infolist (
        "alias", N_("list of aliases"),
        N_("alias pointer (optional)"),
        N_("alias name (wildcard \"*\" is allowed) (optional)"),
        &alias_info_infolist_alias_cb, NULL);
}
コード例 #2
0
void
logger_info_init ()
{
    dogechat_hook_infolist (
        "logger_buffer", N_("list of logger buffers"),
        N_("logger pointer (optional)"),
        NULL,
        &logger_info_infolist_logger_buffer_cb, NULL);
}
コード例 #3
0
void
irc_info_init ()
{
    /* info hooks */
    dogechat_hook_info (
        "irc_is_channel",
        N_("1 if string is a valid IRC channel name for server"),
        N_("server,channel (server is optional)"),
        &irc_info_info_irc_is_channel_cb, NULL);
    dogechat_hook_info (
        "irc_is_nick",
        N_("1 if string is a valid IRC nick name"),
        N_("nickname"),
        &irc_info_info_irc_is_nick_cb, NULL);
    dogechat_hook_info (
        "irc_nick",
        N_("get current nick on a server"),
        N_("server name"),
        &irc_info_info_irc_nick_cb, NULL);
    dogechat_hook_info (
        "irc_nick_from_host",
        N_("get nick from IRC host"),
        N_("IRC host (like `:[email protected]`)"),
        &irc_info_info_irc_nick_from_host_cb, NULL);
    dogechat_hook_info (
        "irc_nick_color",
        N_("get nick color code"),
        N_("nickname"),
        &irc_info_info_irc_nick_color_cb, NULL);
    dogechat_hook_info (
        "irc_nick_color_name",
        N_("get nick color name"),
        N_("nickname"),
        &irc_info_info_irc_nick_color_name_cb, NULL);
    dogechat_hook_info (
        "irc_buffer",
        N_("get buffer pointer for an IRC server/channel/nick"),
        N_("server,channel,nick (channel and nicks are optional)"),
        &irc_info_info_irc_buffer_cb, NULL);
    dogechat_hook_info (
        "irc_server_isupport",
        N_("1 if server supports this feature (from IRC message 005)"),
        N_("server,feature"),
        &irc_info_info_irc_server_isupport_cb, NULL);
    dogechat_hook_info (
        "irc_server_isupport_value",
        N_("value of feature, if supported by server (from IRC message 005)"),
        N_("server,feature"),
        &irc_info_info_irc_server_isupport_value_cb, NULL);

    /* info_hashtable hooks */
    dogechat_hook_info_hashtable (
        "irc_message_parse",
        N_("parse an IRC message"),
        N_("\"message\": IRC message, \"server\": server name (optional)"),
        /* TRANSLATORS: please do not translate key names (enclosed by quotes) */
        N_("\"tags\": tags, "
           "\"message_without_tags\": message without the tags, "
           "\"nick\": nick, "
           "\"host\": host, "
           "\"command\": command, "
           "\"channel\": channel, "
           "\"arguments\": arguments (includes channel), "
           "\"text\": text (for example user message), "
           "\"pos_command\": index of \"command\" message (\"-1\" if "
           "\"command\" was not found), "
           "\"pos_arguments\": index of \"arguments\" message (\"-1\" if "
           "\"arguments\" was not found), "
           "\"pos_channel\": index of \"channel\" message (\"-1\" if "
           "\"channel\" was not found), "
           "\"pos_text\": index of \"text\" message (\"-1\" if "
           "\"text\" was not found)"),
        &irc_info_info_hashtable_irc_message_parse_cb, NULL);
    dogechat_hook_info_hashtable (
        "irc_message_split",
        N_("split an IRC message (to fit in 512 bytes)"),
        N_("\"message\": IRC message, \"server\": server name (optional)"),
        /* TRANSLATORS: please do not translate key names (enclosed by quotes) */
        N_("\"msg1\" ... \"msgN\": messages to send (without final \"\\r\\n\"), "
           "\"args1\" ... \"argsN\": arguments of messages, \"count\": number "
           "of messages"),
        &irc_info_info_hashtable_irc_message_split_cb, NULL);

    /* infolist hooks */
    dogechat_hook_infolist (
        "irc_server",
        N_("list of IRC servers"),
        N_("server pointer (optional)"),
        N_("server name (wildcard \"*\" is allowed) (optional)"),
        &irc_info_infolist_irc_server_cb, NULL);
    dogechat_hook_infolist (
        "irc_channel",
        N_("list of channels for an IRC server"),
        N_("channel pointer (optional)"),
        N_("server,channel (channel is optional)"),
        &irc_info_infolist_irc_channel_cb, NULL);
    dogechat_hook_infolist (
        "irc_nick",
        N_("list of nicks for an IRC channel"),
        N_("nick pointer (optional)"),
        N_("server,channel,nick (nick is optional)"),
        &irc_info_infolist_irc_nick_cb, NULL);
    dogechat_hook_infolist (
        "irc_ignore",
        N_("list of IRC ignores"),
        N_("ignore pointer (optional)"),
        NULL,
        &irc_info_infolist_irc_ignore_cb, NULL);
    dogechat_hook_infolist (
        "irc_notify",
        N_("list of notify"),
        N_("notify pointer (optional)"),
        N_("server name (wildcard \"*\" is allowed) (optional)"),
        &irc_info_infolist_irc_notify_cb, NULL);
    dogechat_hook_infolist (
        "irc_color_dogechat",
        N_("mapping between IRC color codes and DogeChat color names"),
        NULL,
        NULL,
        &irc_info_infolist_irc_color_dogechat_cb, NULL);

    /* hdata hooks */
    dogechat_hook_hdata (
        "irc_nick", N_("irc nick"),
        &irc_nick_hdata_nick_cb, NULL);
    dogechat_hook_hdata (
        "irc_channel", N_("irc channel"),
        &irc_channel_hdata_channel_cb, NULL);
    dogechat_hook_hdata (
        "irc_channel_speaking", N_("irc channel_speaking"),
        &irc_channel_hdata_channel_speaking_cb, NULL);
    dogechat_hook_hdata (
        "irc_ignore", N_("irc ignore"),
        &irc_ignore_hdata_ignore_cb, NULL);
    dogechat_hook_hdata (
        "irc_notify", N_("irc notify"),
        &irc_notify_hdata_notify_cb, NULL);
    dogechat_hook_hdata (
        "irc_redirect_pattern", N_("pattern for irc redirect"),
        &irc_redirect_hdata_redirect_pattern_cb, NULL);
    dogechat_hook_hdata (
        "irc_redirect", N_("irc redirect"),
        &irc_redirect_hdata_redirect_cb, NULL);
    dogechat_hook_hdata (
        "irc_server", N_("irc server"),
        &irc_server_hdata_server_cb, NULL);
}