mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
Merge CChanMessage & CPrivMessage to... CTextMessage
This naming is a bit hairy. I chose CTextMessage because this type of message carries a text argument. Alternatively, it could be also called CPrivateMessage, because the IRC protocol calls it PRIVMSG. On the other hand, ZNC module hooks use the "Priv" naming convention for private messages. It would look a bit weird to have OnChanMsg(CPrivMessage)... More details and reasoning of the merge in the previous commit message.
This commit is contained in:
@@ -1002,7 +1002,7 @@ bool CIRCSock::OnPrivNotice(CMessage& Message) {
|
||||
}
|
||||
|
||||
bool CIRCSock::OnPrivMsg(CMessage& Message) {
|
||||
CPrivMessage& PrivMsg = static_cast<CPrivMessage&>(Message);
|
||||
CTextMessage& PrivMsg = static_cast<CTextMessage&>(Message);
|
||||
bool bResult = false;
|
||||
IRCSOCKMODULECALL(OnPrivMessage(PrivMsg), &bResult);
|
||||
if (bResult) return true;
|
||||
@@ -1087,7 +1087,7 @@ bool CIRCSock::OnChanNotice(CMessage& Message) {
|
||||
}
|
||||
|
||||
bool CIRCSock::OnChanMsg(CMessage& Message) {
|
||||
CChanMessage& ChanMsg = static_cast<CChanMessage&>(Message);
|
||||
CTextMessage& ChanMsg = static_cast<CTextMessage&>(Message);
|
||||
CChan* pChan = m_pNetwork->FindChan(ChanMsg.GetParam(0));
|
||||
if (pChan) {
|
||||
FixupChanNick(Message.GetNick(), pChan);
|
||||
|
||||
Reference in New Issue
Block a user