mirror of
https://github.com/weechat/weechat.git
synced 2026-06-12 14:14:48 +02:00
irc: require nick in "away" command callback
This commit is contained in:
@@ -544,6 +544,7 @@ IRC_PROTOCOL_CALLBACK(away)
|
||||
struct t_irc_nick *ptr_nick;
|
||||
|
||||
IRC_PROTOCOL_MIN_PARAMS(0);
|
||||
IRC_PROTOCOL_CHECK_NICK;
|
||||
|
||||
for (ptr_channel = server->channels; ptr_channel;
|
||||
ptr_channel = ptr_channel->next_channel)
|
||||
|
||||
@@ -725,6 +725,10 @@ TEST(IrcProtocolWithServer, away)
|
||||
|
||||
SRV_INIT_JOIN;
|
||||
|
||||
/* missing nick */
|
||||
RECV("AWAY");
|
||||
CHECK_ERROR_NICK("away");
|
||||
|
||||
ptr_nick = ptr_server->channels->nicks;
|
||||
|
||||
LONGS_EQUAL(0, ptr_nick->away);
|
||||
|
||||
Reference in New Issue
Block a user