Add OnUserTopicRequest() for topic requests

OnUserTopic() used to try to handle this, but it really failed to...


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1185 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2008-09-02 12:39:18 +00:00
parent 41fce82fc8
commit 0316c6a1df
3 changed files with 11 additions and 13 deletions

View File

@@ -251,20 +251,14 @@ void CClient::ReadLine(const CString& sData) {
} 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;
if (!sTopic.empty()) {
if (sTopic.Left(1) == ":")
sTopic.LeftChomp();
MODULECALL(OnUserTopic(sChan, sTopic), m_pUser, this, return);
sLine = "TOPIC " + sChan + " :" + sTopic;
} else {
MODULECALL(OnUserTopicRequest(sChan), m_pUser, this, return);
}
} else if (sCommand.CaseCmp("MODE") == 0) {
CString sTarget = sLine.Token(1);