mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
Fix changing client nick when client connects.
If nicks are equal, it's not changed. The problem was that equality was checked case-insensitively. This makes some clients which compare nicks case-sensitively think that JOINs which we send to them, are not related to the user, it's someone else joining. So Konversation users which have lower case version of their IRC nick configured in Konversation settings, didn't get their channel opened when connecting to ZNC. Thanks to Axanon for helping to investigate the issue.
This commit is contained in:
@@ -468,7 +468,7 @@ void CIRCNetwork::ClientConnected(CClient *pClient) {
|
||||
}
|
||||
|
||||
const CNick& Nick = GetIRCNick();
|
||||
if (!sClientNick.Equals(Nick.GetNick())) {
|
||||
if (sClientNick != Nick.GetNick()) { // case-sensitive match
|
||||
pClient->PutClient(":" + sClientNick + "!" + Nick.GetIdent() +
|
||||
"@" + Nick.GetHost() + " NICK :" + Nick.GetNick());
|
||||
pClient->SetNick(Nick.GetNick());
|
||||
|
||||
Reference in New Issue
Block a user