Send nick changes to clients before we use call the OnNick module hook

This fixes a bug where sending anything to a client, such as with
PutModule will fail because it will refer to the new nick before the
client knows about it. The watch module did this.
This commit is contained in:
Kyle Fuller
2012-02-12 20:07:57 +00:00
parent b450fde4f6
commit 5c844cf81a

View File

@@ -411,8 +411,9 @@ void CIRCSock::ReadLine(const CString& sData) {
// Todo: use nick compare function here
if (Nick.GetNick().Equals(GetNick())) {
// We are changing our own nick, the clients always must see this!
bIsVisible = true;
bIsVisible = false;
SetNick(sNewNick);
m_pNetwork->PutUser(sLine);
}
IRCSOCKMODULECALL(OnNick(Nick, sNewNick, vFoundChans), NOTHING);