1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-26 04:46:37 +02:00

irc: display ACCOUNT command in private buffers

This commit is contained in:
Sébastien Helleu
2022-08-13 22:58:37 +02:00
parent aee3da5452
commit 223eefef67
3 changed files with 81 additions and 48 deletions
+17 -11
View File
@@ -662,32 +662,38 @@ TEST(IrcProtocolWithServer, account_without_account_notify_cap)
{
struct t_irc_nick *ptr_nick;
SRV_INIT_JOIN;
SRV_INIT_JOIN2;
ptr_nick = ptr_server->channels->nicks;
RECV(":bob!user@host PRIVMSG alice :hi Alice!");
ptr_nick = ptr_server->channels->last_nick;
POINTERS_EQUAL(NULL, ptr_nick->account);
/* not enough parameters */
RECV(":alice!user@host ACCOUNT");
RECV(":bob!user@host ACCOUNT");
CHECK_ERROR_PARAMS("account", 0, 1);
POINTERS_EQUAL(NULL, ptr_nick->account);
RECV(":alice!user@host ACCOUNT *");
CHECK_CHAN("-- alice has unidentified");
RECV(":bob!user@host ACCOUNT *");
CHECK_CHAN("-- bob has unidentified");
CHECK_PV("bob", "-- bob has unidentified");
POINTERS_EQUAL(NULL, ptr_nick->account);
RECV(":alice!user@host ACCOUNT :*");
CHECK_CHAN("-- alice has unidentified");
RECV(":bob!user@host ACCOUNT :*");
CHECK_CHAN("-- bob has unidentified");
CHECK_PV("bob", "-- bob has unidentified");
POINTERS_EQUAL(NULL, ptr_nick->account);
RECV(":alice!user@host ACCOUNT new_account");
CHECK_CHAN("-- alice has identified as new_account");
RECV(":bob!user@host ACCOUNT new_account");
CHECK_CHAN("-- bob has identified as new_account");
CHECK_PV("bob", "-- bob has identified as new_account");
POINTERS_EQUAL(NULL, ptr_nick->account);
RECV(":alice!user@host ACCOUNT :new_account");
CHECK_CHAN("-- alice has identified as new_account");
RECV(":bob!user@host ACCOUNT :new_account");
CHECK_CHAN("-- bob has identified as new_account");
CHECK_PV("bob", "-- bob has identified as new_account");
POINTERS_EQUAL(NULL, ptr_nick->account);
}