summaryrefslogtreecommitdiff
path: root/src/plugins/irc/irc-server.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/irc/irc-server.c')
-rw-r--r--src/plugins/irc/irc-server.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/plugins/irc/irc-server.c b/src/plugins/irc/irc-server.c
index 44293fba9..b754ec3e3 100644
--- a/src/plugins/irc/irc-server.c
+++ b/src/plugins/irc/irc-server.c
@@ -1361,7 +1361,8 @@ irc_server_get_max_modes (struct t_irc_server *server)
char *
irc_server_get_default_msg (const char *default_msg,
struct t_irc_server *server,
- const char *channel_name)
+ const char *channel_name,
+ const char *target_nick)
{
char *version;
struct t_hashtable *extra_vars;
@@ -1393,6 +1394,8 @@ irc_server_get_default_msg (const char *default_msg,
weechat_hashtable_set (extra_vars, "channel",
(channel_name) ? channel_name : "");
weechat_hashtable_set (extra_vars, "nick", server->nick);
+ if (target_nick)
+ weechat_hashtable_set (extra_vars, "target", target_nick);
}
msg = weechat_string_eval_expression (default_msg, NULL, extra_vars, NULL);