From: Alexander Barton Date: Sun, 4 Nov 2012 17:01:49 +0000 (+0100) Subject: Send NICK commands with prefix of (target) user X-Git-Tag: rel-20-rc1~18 X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;ds=sidebyside;h=757f3497bc594a5a950806279349d361be7a1515;p=ngircd.git Send NICK commands with prefix of (target) user 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). --- diff --git a/src/ngircd/irc-login.c b/src/ngircd/irc-login.c index 977fc546..5ec6162c 100644 --- a/src/ngircd/irc-login.c +++ b/src/ngircd/irc-login.c @@ -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);