diff options
Diffstat (limited to 'src/plugins/irc/irc-server.c')
-rw-r--r-- | src/plugins/irc/irc-server.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/plugins/irc/irc-server.c b/src/plugins/irc/irc-server.c index 93d5e877f..ad2e8e38f 100644 --- a/src/plugins/irc/irc-server.c +++ b/src/plugins/irc/irc-server.c @@ -494,6 +494,8 @@ irc_server_set_index_current_address (struct t_irc_server *server, int index) void irc_server_set_nicks (struct t_irc_server *server, const char *nicks) { + char *nicks2; + /* free data */ server->nicks_count = 0; if (server->nicks_array) @@ -502,10 +504,16 @@ irc_server_set_nicks (struct t_irc_server *server, const char *nicks) server->nicks_array = NULL; } + /* evaluate value */ + nicks2 = weechat_string_eval_expression (nicks, NULL, NULL, NULL); + /* set new nicks */ server->nicks_array = weechat_string_split ( - (nicks) ? nicks : IRC_SERVER_DEFAULT_NICKS, + (nicks2) ? nicks2 : IRC_SERVER_DEFAULT_NICKS, ",", 0, 0, &server->nicks_count); + + if (nicks2) + free (nicks2); } /* |