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:
psychon
2008-06-06 14:27:57 +00:00
parent d701809ac1
commit 442ef47c56
4 changed files with 29 additions and 0 deletions

View File

@@ -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);