1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-29 06:16:40 +02:00

irc: use parsed command parameters in "setname" command callback

This commit is contained in:
Sébastien Helleu
2021-10-14 23:28:44 +02:00
parent 8d12187f3d
commit 03e0122155
2 changed files with 17 additions and 8 deletions
+6 -2
View File
@@ -1764,9 +1764,13 @@ TEST(IrcProtocolWithServer, setname_without_setname_cap)
POINTERS_EQUAL(NULL, ptr_nick->realname);
/* not enough arguments */
/* not enough parameters */
RECV(":alice!user@host SETNAME");
CHECK_ERROR_ARGS("setname", 2, 3);
CHECK_ERROR_PARAMS("setname", 0, 1);
/* missing nick */
RECV("SETNAME :new bob realname");
CHECK_ERROR_NICK("setname");
POINTERS_EQUAL(NULL, ptr_nick->realname);