mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
Add OnSendToIRCMessage and OnSendToClientMessage
This also alters PutClient such that the CMessage variant handles sending messages, rather than the CString variant. As a side bonus, this gives callers better information on whether the message was sent to the client. Additionally, it eliminates the need for a hook to let modules set the tags sent to a client, as that can now be done inside OnSendToClientMessage.
This commit is contained in:
@@ -983,7 +983,14 @@ CModule::EModRet CModule::OnDeleteNetwork(CIRCNetwork& Network) {
|
||||
CModule::EModRet CModule::OnSendToClient(CString& sLine, CClient& Client) {
|
||||
return CONTINUE;
|
||||
}
|
||||
CModule::EModRet CModule::OnSendToClientMessage(CMessage& Message) {
|
||||
return CONTINUE;
|
||||
}
|
||||
|
||||
CModule::EModRet CModule::OnSendToIRC(CString& sLine) { return CONTINUE; }
|
||||
CModule::EModRet CModule::OnSendToIRCMessage(CMessage& Message) {
|
||||
return CONTINUE;
|
||||
}
|
||||
|
||||
bool CModule::OnServerCapAvailable(const CString& sCap) { return false; }
|
||||
void CModule::OnServerCapResult(const CString& sCap, bool bSuccess) {}
|
||||
@@ -1444,7 +1451,13 @@ bool CModules::OnDeleteNetwork(CIRCNetwork& Network) {
|
||||
bool CModules::OnSendToClient(CString& sLine, CClient& Client) {
|
||||
MODHALTCHK(OnSendToClient(sLine, Client));
|
||||
}
|
||||
bool CModules::OnSendToClientMessage(CMessage& Message) {
|
||||
MODHALTCHK(OnSendToClientMessage(Message));
|
||||
}
|
||||
bool CModules::OnSendToIRC(CString& sLine) { MODHALTCHK(OnSendToIRC(sLine)); }
|
||||
bool CModules::OnSendToIRCMessage(CMessage& Message) {
|
||||
MODHALTCHK(OnSendToIRCMessage(Message));
|
||||
}
|
||||
bool CModules::OnStatusCommand(CString& sCommand) {
|
||||
MODHALTCHK(OnStatusCommand(sCommand));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user