diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2021-01-30 09:59:04 +0100 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2021-01-30 09:59:04 +0100 |
commit | 0c98b0cfa42e90574a858c4ff27f7f45f05b3748 (patch) | |
tree | 601e7e41987ce2ae1ffabbfd628b0df0dd9f47a4 /src/plugins | |
parent | ba892ee5a03bedfe1add5344a8a45a7ea5e54563 (diff) | |
download | weechat-0c98b0cfa42e90574a858c4ff27f7f45f05b3748.zip |
irc: use server option "default_chantypes" as fallback in function irc_nick_is_nick
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/irc/irc-nick.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/plugins/irc/irc-nick.c b/src/plugins/irc/irc-nick.c index 38993e0c9..e09b41d44 100644 --- a/src/plugins/irc/irc-nick.c +++ b/src/plugins/irc/irc-nick.c @@ -81,8 +81,16 @@ irc_nick_is_nick (struct t_irc_server *server, const char *string) utf8mapping = (server) ? server->utf8mapping : IRC_SERVER_UTF8MAPPING_NONE; ptr_prefix_chars = (server && server->prefix_chars) ? server->prefix_chars : irc_server_prefix_chars_default; - ptr_chantypes = (server && server->chantypes) ? - server->chantypes : irc_channel_default_chantypes; + if (server) + { + ptr_chantypes = (server->chantypes) ? + server->chantypes : + IRC_SERVER_OPTION_STRING(server, IRC_SERVER_OPTION_DEFAULT_CHANTYPES); + } + else + { + ptr_chantypes = irc_channel_default_chantypes; + } /* check length of nick in bytes (if we have a limit in the server) */ if (server && (server->nick_max_length > 0) |