]> arthur.barton.de Git - ngircd-alex.git/commitdiff
Send NICK commands with prefix of (target) user
authorAlexander Barton <alex@barton.de>
Sun, 4 Nov 2012 17:01:49 +0000 (18:01 +0100)
committerAlexander Barton <alex@barton.de>
Sun, 4 Nov 2012 17:01:49 +0000 (18:01 +0100)
Now NICK commands are always generated using the prefix of the target
user, even when the nickname change has been initiated by some other
(pseudo) server or using the SVSNICK command. In this case, the prefix
of the initiator has been used, but this isn't compatible with clients
(at least weechat and irssi don't handle such NICK commands correctly).

src/ngircd/irc-login.c

index 977fc54666e75ee8e5d753104cd46512f8471382..5ec6162ca548c99024b8dad14b0297ac86b36a39 100644 (file)
@@ -971,7 +971,7 @@ Change_Nick(CLIENT *Origin, CLIENT *Target, char *NewNick, bool InformClient)
 
        /* Inform all servers and users (which have to know) of the new name */
        if (InformClient) {
-               IRC_WriteStrClientPrefix(Target, Origin, "NICK :%s", NewNick);
+               IRC_WriteStrClientPrefix(Target, Target, "NICK :%s", NewNick);
                IRC_WriteStrServersPrefix(NULL, Target, "NICK :%s", NewNick);
        } else
                IRC_WriteStrServersPrefix(Origin, Target, "NICK :%s", NewNick);