From b03bc3cac9099672cf3a68fcd5614adb18aa09cd Mon Sep 17 00:00:00 2001 From: psychon Date: Sat, 11 Jul 2009 18:04:25 +0000 Subject: [PATCH] Make sure OnStatusCommand() is always called when it should be We didn't call the module hook for commands executed via /znc instead of /msg *status. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1562 726aef4b-f618-498e-8847-2d620e286838 --- Client.cpp | 1 - Client.h | 2 +- ClientCommand.cpp | 4 +++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Client.cpp b/Client.cpp index 33562a9e..ad7d2de1 100644 --- a/Client.cpp +++ b/Client.cpp @@ -517,7 +517,6 @@ void CClient::ReadLine(const CString& sData) { if (sTarget.TrimPrefix(m_pUser->GetStatusPrefix())) { if (sTarget.Equals("status")) { - MODULECALL(OnStatusCommand(sMsg), m_pUser, this, return); UserCommand(sMsg); } else { #ifdef _MODULES diff --git a/Client.h b/Client.h index 7dac0721..0e0e880d 100644 --- a/Client.h +++ b/Client.h @@ -101,7 +101,7 @@ public: bool HasNamesx() const { return m_bNamesx; } bool HasUHNames() const { return m_bUHNames; } - void UserCommand(const CString& sCommand); + void UserCommand(CString& sCommand); void StatusCTCP(const CString& sCommand); void IRCConnected(CIRCSock* pIRCSock); void IRCDisconnected(); diff --git a/ClientCommand.cpp b/ClientCommand.cpp index b5014cf0..12c7474e 100644 --- a/ClientCommand.cpp +++ b/ClientCommand.cpp @@ -15,7 +15,7 @@ #include "User.h" #include "znc.h" -void CClient::UserCommand(const CString& sLine) { +void CClient::UserCommand(CString& sLine) { if (!m_pUser) { return; } @@ -24,6 +24,8 @@ void CClient::UserCommand(const CString& sLine) { return; } + MODULECALL(OnStatusCommand(sLine), m_pUser, this, return); + CString sCommand = sLine.Token(0); if (sCommand.Equals("HELP")) {