mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
Add OnUserTopic module call
Patch by SilverLeo git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1086 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
18
Client.cpp
18
Client.cpp
@@ -222,6 +222,24 @@ void CClient::ReadLine(const CString& sData) {
|
||||
if (!sMessage.empty()) {
|
||||
sLine += " :" + sMessage;
|
||||
}
|
||||
} else if (sCommand.CaseCmp("TOPIC") == 0) {
|
||||
CString sChan = sLine.Token(1);
|
||||
CString sTopic = sLine.Token(2, true);
|
||||
bool bUnset = false;
|
||||
|
||||
if (sTopic.Left(1) == ":") {
|
||||
sTopic.LeftChomp();
|
||||
if (sTopic.empty())
|
||||
bUnset = true;
|
||||
}
|
||||
|
||||
MODULECALL(OnUserTopic(sChan, sTopic), m_pUser, this, return);
|
||||
|
||||
sLine = "TOPIC " + sChan;
|
||||
|
||||
if (!sTopic.empty() || bUnset) {
|
||||
sLine += " :" + sTopic;
|
||||
}
|
||||
} else if (sCommand.CaseCmp("MODE") == 0) {
|
||||
CString sTarget = sLine.Token(1);
|
||||
CString sModes = sLine.Token(2, true);
|
||||
|
||||
Reference in New Issue
Block a user