mirror of
https://github.com/weechat/weechat.git
synced 2026-07-03 16:23:14 +02:00
irc: do not allow command /query with a channel name (closes #459)
This commit is contained in:
@@ -3866,6 +3866,18 @@ irc_command_query (void *data, struct t_gui_buffer *buffer, int argc,
|
||||
|
||||
for (i = 0; i < num_nicks; i++)
|
||||
{
|
||||
/* ensure the name is not a channel name */
|
||||
if (irc_channel_is_channel (ptr_server, nicks[i]))
|
||||
{
|
||||
weechat_printf (
|
||||
ptr_server->buffer,
|
||||
_("%s%s: \"%s\" command can not be executed with a "
|
||||
"channel name (\"%s\")"),
|
||||
weechat_prefix ("error"), IRC_PLUGIN_NAME, "query",
|
||||
nicks[i]);
|
||||
continue;
|
||||
}
|
||||
|
||||
/* create private window if not already opened */
|
||||
ptr_channel = irc_channel_search (ptr_server, nicks[i]);
|
||||
if (!ptr_channel)
|
||||
|
||||
Reference in New Issue
Block a user