diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2020-02-10 21:18:47 +0100 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2020-02-10 21:18:47 +0100 |
commit | 230f64858487e41baa2b92a9d68a0ec732a58bd9 (patch) | |
tree | 163d260daa1c30cacd9d8876a8e6566bc0374ddd /src | |
parent | 9904cb6d2eb40f679d8ff6557c22d53a3e3dc75a (diff) | |
download | weechat-230f64858487e41baa2b92a9d68a0ec732a58bd9.zip |
irc: use irc_server_prefix_chars_default if server->prefix_chars is NULL
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/irc/irc-server.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/plugins/irc/irc-server.c b/src/plugins/irc/irc-server.c index d66b50657..cd6c100d7 100644 --- a/src/plugins/irc/irc-server.c +++ b/src/plugins/irc/irc-server.c @@ -994,7 +994,8 @@ irc_server_set_prefix_modes_chars (struct t_irc_server *server, return; old_length_chars = (server->prefix_chars) ? - strlen (server->prefix_chars) : 0; + strlen (server->prefix_chars) : + strlen (irc_server_prefix_chars_default); /* free previous values */ if (server->prefix_modes) @@ -1036,8 +1037,11 @@ irc_server_set_prefix_modes_chars (struct t_irc_server *server, } } - length_chars = (server->prefix_chars) ? strlen (server->prefix_chars) : 0; - if (server->prefix_chars && (length_chars != old_length_chars)) + length_chars = (server->prefix_chars) ? + strlen (server->prefix_chars) : + strlen (irc_server_prefix_chars_default); + + if (length_chars != old_length_chars) irc_nick_realloc_prefixes (server, old_length_chars, length_chars); } |