diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2021-01-30 10:34:23 +0100 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2021-01-30 10:34:23 +0100 |
commit | 691c9a0a0fead81cf1b651c5d875b46e0af8e037 (patch) | |
tree | 6fce8fb9babbb624d73c28ec72e9c557c40ca9f0 /src/plugins/irc/irc-channel.c | |
parent | 0c98b0cfa42e90574a858c4ff27f7f45f05b3748 (diff) | |
download | weechat-691c9a0a0fead81cf1b651c5d875b46e0af8e037.zip |
irc: add function irc_server_get_chantypes
Diffstat (limited to 'src/plugins/irc/irc-channel.c')
-rw-r--r-- | src/plugins/irc/irc-channel.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/plugins/irc/irc-channel.c b/src/plugins/irc/irc-channel.c index cd5d034e7..b81f87f73 100644 --- a/src/plugins/irc/irc-channel.c +++ b/src/plugins/irc/irc-channel.c @@ -675,14 +675,8 @@ irc_channel_is_channel (struct t_irc_server *server, const char *string) first_char[0] = string[0]; first_char[1] = '\0'; - /* default global chantypes if no server received */ - if (!server) - return (strpbrk (first_char, irc_channel_default_chantypes)) ? 1 : 0; - - /* server chantypes, or option "default_chantypes" as fallback */ - ptr_chantypes = (server->chantypes) ? - server->chantypes : - IRC_SERVER_OPTION_STRING(server, IRC_SERVER_OPTION_DEFAULT_CHANTYPES); + ptr_chantypes = irc_server_get_chantypes (server); + return (strpbrk (first_char, ptr_chantypes)) ? 1 : 0; } @@ -707,9 +701,7 @@ irc_channel_get_auto_chantype (struct t_irc_server *server, if (weechat_config_boolean (irc_config_look_join_auto_add_chantype) && !irc_channel_is_channel (server, channel_name)) { - ptr_chantypes = (server->chantypes) ? - server->chantypes : - IRC_SERVER_OPTION_STRING(server, IRC_SERVER_OPTION_DEFAULT_CHANTYPES); + ptr_chantypes = irc_server_get_chantypes (server); if (ptr_chantypes && ptr_chantypes[0]) { /* |