summaryrefslogtreecommitdiff
path: root/src/plugins/irc/irc-command.c
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2021-05-29 14:26:30 +0200
committerSébastien Helleu <flashcode@flashtux.org>2021-05-29 14:26:30 +0200
commit4a41625989e02cd194938e580923b484e0bd4a0f (patch)
tree46c78a9c0346bb2504916810002d09f3a2b0b27a /src/plugins/irc/irc-command.c
parenta9b976274e9cad44151128d8d228e6989ba2f813 (diff)
downloadweechat-4a41625989e02cd194938e580923b484e0bd4a0f.zip
irc: add variable "${target}" (target nick) in commands /kick and /kickban
Diffstat (limited to 'src/plugins/irc/irc-command.c')
-rw-r--r--src/plugins/irc/irc-command.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/plugins/irc/irc-command.c b/src/plugins/irc/irc-command.c
index f28fa12f8..7728fbb09 100644
--- a/src/plugins/irc/irc-command.c
+++ b/src/plugins/irc/irc-command.c
@@ -1755,7 +1755,8 @@ IRC_COMMAND_CALLBACK(cycle)
IRC_SERVER_OPTION_MSG_PART);
if (ptr_arg && ptr_arg[0])
{
- msg = irc_server_get_default_msg (ptr_arg, ptr_server, channel_name);
+ msg = irc_server_get_default_msg (ptr_arg, ptr_server, channel_name,
+ NULL);
irc_server_sendf (ptr_server, IRC_SERVER_SEND_OUTQ_PRIO_HIGH, NULL,
"PART %s :%s", channel_name, msg);
}
@@ -2033,7 +2034,7 @@ irc_command_quit_server (struct t_irc_server *server, const char *arguments)
IRC_SERVER_OPTION_MSG_QUIT);
if (ptr_arg && ptr_arg[0])
{
- msg = irc_server_get_default_msg (ptr_arg, server, NULL);
+ msg = irc_server_get_default_msg (ptr_arg, server, NULL, NULL);
irc_server_sendf (server, 0, NULL, "QUIT :%s", msg);
}
else
@@ -2775,7 +2776,8 @@ irc_command_kick_channel (struct t_irc_server *server,
IRC_SERVER_OPTION_MSG_KICK);
if (ptr_msg && ptr_msg[0])
{
- msg = irc_server_get_default_msg (ptr_msg, server, channel_name);
+ msg = irc_server_get_default_msg (ptr_msg, server, channel_name,
+ nick_name);
irc_server_sendf (server, IRC_SERVER_SEND_OUTQ_PRIO_HIGH, NULL,
"KICK %s %s :%s",
channel_name, nick_name, msg);
@@ -3942,7 +3944,7 @@ irc_command_part_channel (struct t_irc_server *server, const char *channel_name,
IRC_SERVER_OPTION_MSG_PART);
if (ptr_arg && ptr_arg[0])
{
- msg = irc_server_get_default_msg (ptr_arg, server, channel_name);
+ msg = irc_server_get_default_msg (ptr_arg, server, channel_name, NULL);
irc_server_sendf (server, IRC_SERVER_SEND_OUTQ_PRIO_HIGH, NULL,
"PART %s :%s", channel_name, msg);
}
@@ -6694,8 +6696,9 @@ irc_command_init ()
N_("[<channel>] <nick> [<reason>]"),
N_("channel: channel name\n"
" nick: nick\n"
- " reason: reason (special variables $nick, $channel and $server are "
- "replaced by their value)"),
+ " reason: reason (evaluated, see /help eval; special variables "
+ "${nick} (self nick), ${target} (target nick), ${channel} and "
+ "${server} are replaced by their values)"),
"%(nicks) %(irc_msg_kick) %-", &irc_command_kick, NULL, NULL);
weechat_hook_command (
"kickban",
@@ -6703,8 +6706,9 @@ irc_command_init ()
N_("[<channel>] <nick> [<reason>]"),
N_("channel: channel name\n"
" nick: nick\n"
- " reason: reason (special variables $nick, $channel and $server are "
- "replaced by their value)\n"
+ " reason: reason (evaluated, see /help eval; special variables "
+ "${nick} (self nick), ${target} (target nick), ${channel} and "
+ "${server} are replaced by their values)\n"
"\n"
"It is possible to kick/ban with a mask, nick will be extracted from "
"mask and replaced by \"*\".\n"