From 5c844cf81aa8aaa6b1b411da793f944f3a4820d3 Mon Sep 17 00:00:00 2001 From: Kyle Fuller Date: Sun, 12 Feb 2012 20:07:57 +0000 Subject: [PATCH] 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. --- src/IRCSock.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/IRCSock.cpp b/src/IRCSock.cpp index cf93d4af..0481cff0 100644 --- a/src/IRCSock.cpp +++ b/src/IRCSock.cpp @@ -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);