Skip to content

Commit

Permalink
Fix changing client nick when client connects.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
DarthGandalf committed Dec 25, 2012
1 parent 0250462 commit 3909577
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/IRCNetwork.cpp
Expand Up @@ -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());
Expand Down

0 comments on commit 3909577

Please sign in to comment.