1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-24 20:06:38 +02:00

irc: add message 415 (cannot send message to channel)

This commit is contained in:
Sébastien Helleu
2023-04-24 21:43:57 +02:00
parent 9f5e8efbe0
commit 28bb33aa5a
3 changed files with 25 additions and 0 deletions
+1
View File
@@ -62,6 +62,7 @@ Bug fixes::
* irc: update autojoin option with redirected channels when autojoin_dynamic is enabled (issue #1898)
* irc: don't switch to buffer of joined channel if it was not manually joined nor present in server autojoin option
* irc: fix target buffer for commands 432/433 (erroneous nickname/nickname already in use) when the nickname looks like a channel
* irc: add message 415 (cannot send message to channel)
* lua: fix crash with print when the value to print is not a string (issue #1904, issue #1905)
* spell: check buffer pointer received in info "spell_dict"
* typing: fix crash when pointer buffer is not received in callback for signal "input_text_changed" (issue #1869)
+1
View File
@@ -7550,6 +7550,7 @@ irc_protocol_recv_command (struct t_irc_server *server,
IRCB(412, 1, 0, generic_error), /* no text to send */
IRCB(413, 1, 0, generic_error), /* no toplevel */
IRCB(414, 1, 0, generic_error), /* wilcard in toplevel domain */
IRCB(415, 1, 0, generic_error), /* cannot send message to channel */
IRCB(421, 1, 0, generic_error), /* unknown command */
IRCB(422, 1, 0, generic_error), /* MOTD is missing */
IRCB(423, 1, 0, generic_error), /* no administrative info */
@@ -3830,6 +3830,29 @@ TEST(IrcProtocolWithServer, 404)
CHECK_SRV("-- #test2: Cannot send to channel");
}
/*
* Tests functions:
* irc_protocol_cb_415 (cannot send to channel)
*/
TEST(IrcProtocolWithServer, 415)
{
SRV_INIT_JOIN;
/* not enough parameters */
RECV(":server 415");
CHECK_ERROR_PARAMS("415", 0, 2);
RECV(":server 415 alice");
CHECK_ERROR_PARAMS("415", 1, 2);
RECV(":server 415 alice #test");
CHECK_SRV("-- #test");
RECV(":server 415 alice #test :Cannot send message to channel (+R)");
CHECK_CHAN("-- #test: Cannot send message to channel (+R)");
RECV(":server 415 alice #test2 :Cannot send message to channel (+R)");
CHECK_SRV("-- #test2: Cannot send message to channel (+R)");
}
/*
* Tests functions:
* irc_protocol_cb_432 (erroneous nickname, not connected)