diff options
Diffstat (limited to 'src/plugins/relay/irc/relay-irc.c')
-rw-r--r-- | src/plugins/relay/irc/relay-irc.c | 82 |
1 files changed, 41 insertions, 41 deletions
diff --git a/src/plugins/relay/irc/relay-irc.c b/src/plugins/relay/irc/relay-irc.c index f210169d7..18131b4c1 100644 --- a/src/plugins/relay/irc/relay-irc.c +++ b/src/plugins/relay/irc/relay-irc.c @@ -1633,60 +1633,60 @@ relay_irc_recv (struct t_relay_client *client, const char *data) weechat_hashtable_set (hash_redirect, "signal", str_signal); if (weechat_strcasecmp (irc_command, "mode") == 0) { - if (irc_argc == 1) - redirect_msg = 1; - weechat_hashtable_set (hash_redirect, "pattern", - "mode_channel"); if (irc_argc > 0) { + if (irc_argc == 1) + redirect_msg = 1; + weechat_hashtable_set (hash_redirect, "pattern", + "mode_channel"); weechat_hashtable_set (hash_redirect, "string", irc_argv[0]); - } - snprintf (str_server_channel, - sizeof (str_server_channel), - "%s,%s", - client->protocol_args, - irc_argv[0]); - info = weechat_info_get ("irc_is_channel", - str_server_channel); - if (info && (strcmp (info, "1") == 0)) - { - /* command "MODE #channel ..." */ - if (irc_argc == 2) + snprintf (str_server_channel, + sizeof (str_server_channel), + "%s,%s", + client->protocol_args, + irc_argv[0]); + info = weechat_info_get ("irc_is_channel", + str_server_channel); + if (info && (strcmp (info, "1") == 0)) { - if ((strcmp (irc_argv[1], "b") == 0) - || (strcmp (irc_argv[1], "+b") == 0)) + /* command "MODE #channel ..." */ + if (irc_argc == 2) { - redirect_msg = 1; - weechat_hashtable_set (hash_redirect, "pattern", - "mode_channel_ban"); + if ((strcmp (irc_argv[1], "b") == 0) + || (strcmp (irc_argv[1], "+b") == 0)) + { + redirect_msg = 1; + weechat_hashtable_set (hash_redirect, "pattern", + "mode_channel_ban"); + } + else if ((strcmp (irc_argv[1], "e") == 0) + || (strcmp (irc_argv[1], "+e") == 0)) + { + redirect_msg = 1; + weechat_hashtable_set (hash_redirect, "pattern", + "mode_channel_ban_exception"); + } + else if ((strcmp (irc_argv[1], "I") == 0) + || (strcmp (irc_argv[1], "+I") == 0)) + { + redirect_msg = 1; + weechat_hashtable_set (hash_redirect, "pattern", + "mode_channel_invite"); + } } - else if ((strcmp (irc_argv[1], "e") == 0) - || (strcmp (irc_argv[1], "+e") == 0)) - { - redirect_msg = 1; - weechat_hashtable_set (hash_redirect, "pattern", - "mode_channel_ban_exception"); - } - else if ((strcmp (irc_argv[1], "I") == 0) - || (strcmp (irc_argv[1], "+I") == 0)) + } + else + { + /* command "MODE nick ..." */ + if (irc_argc == 1) { redirect_msg = 1; weechat_hashtable_set (hash_redirect, "pattern", - "mode_channel_invite"); + "mode_user"); } } } - else - { - /* command "MODE nick ..." */ - if (irc_argc == 1) - { - redirect_msg = 1; - weechat_hashtable_set (hash_redirect, "pattern", - "mode_user"); - } - } } else if (weechat_strcasecmp (irc_command, "ison") == 0) { |