]> arthur.barton.de Git - ngircd-alex.git/commitdiff
Fix RPL_INVITING message: It must originate from the server
authorAlexander Barton <alex@barton.de>
Tue, 18 Jul 2023 09:42:07 +0000 (11:42 +0200)
committerAlexander Barton <alex@barton.de>
Tue, 18 Jul 2023 09:42:07 +0000 (11:42 +0200)
All numeric replies must originate from an IRC server, never from a
client. So fix the RPL_INVITING message!

Thanks tommyrot for reporting this!

Closes #307.

src/ngircd/irc-op.c

index a309ee9f068fcba162c9f393a8b1d46633c3604c..2bf9e349b36245dced9ee4485acb43a8b2f1fef7 100644 (file)
@@ -222,9 +222,9 @@ IRC_INVITE(CLIENT *Client, REQUEST *Req)
 
        if (Client_Conn(target) > NONE) {
                /* The target user is local, so we have to send the status code */
-               if (!IRC_WriteStrClientPrefix(from, target, RPL_INVITING_MSG,
-                                              Client_ID(from), Req->argv[0],
-                                              colon_if_necessary, Req->argv[1]))
+               if (!IRC_WriteStrClient(from, RPL_INVITING_MSG,
+                                       Client_ID(from), Req->argv[0],
+                                       colon_if_necessary, Req->argv[1]))
                        return DISCONNECTED;
 
                if (Client_HasMode(target, 'a') &&