Call OnChanAction() after OnChanCTCP()

Now these two module hooks are called in the same order as OnPrivAction() and
OnPrivCTCP().

Additionally, one can now properly block channel action's from reaching the
channel buffer via return HALTCORE; in OnChanAction.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1730 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2010-02-03 14:46:57 +00:00
parent 2594111e75
commit c46616376a
2 changed files with 5 additions and 2 deletions
+3 -2
View File
@@ -761,15 +761,16 @@ bool CIRCSock::OnPrivMsg(CNick& Nick, CString& sMessage) {
bool CIRCSock::OnChanCTCP(CNick& Nick, const CString& sChan, CString& sMessage) {
CChan* pChan = m_pUser->FindChan(sChan);
if (pChan) {
MODULECALL(OnChanCTCP(Nick, *pChan, sMessage), m_pUser, NULL, return true);
// Record a /me
if (sMessage.TrimPrefix("ACTION ")) {
MODULECALL(OnChanAction(Nick, *pChan, sMessage), m_pUser, NULL, return true);
if (pChan->KeepBuffer() || !m_pUser->IsUserAttached() || pChan->IsDetached()) {
pChan->AddBuffer(":" + Nick.GetNickMask() + " PRIVMSG " + sChan + " :\001ACTION " + m_pUser->AddTimestamp(sMessage) + "\001");
}
MODULECALL(OnChanAction(Nick, *pChan, sMessage), m_pUser, NULL, return true);
sMessage = "ACTION " + sMessage;
}
MODULECALL(OnChanCTCP(Nick, *pChan, sMessage), m_pUser, NULL, return true);
}
if (OnGeneralCTCP(Nick, sMessage))