mirror of
https://github.com/znc/znc.git
synced 2026-08-08 01:43:03 +02:00
Patched using forward_msgs_to_other_clients.patch by psycho
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@770 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
+26
@@ -252,6 +252,19 @@ void CClient::ReadLine(const CString& sData) {
|
||||
pChan->AddBuffer(":" + GetNickMask() + " NOTICE " + sTarget + " :" + sMsg);
|
||||
}
|
||||
|
||||
// Relay to the rest of the clients that may be connected to this user
|
||||
if (m_pUser && m_pUser->IsChan(sTarget)) {
|
||||
vector<CClient*>& vClients = m_pUser->GetClients();
|
||||
|
||||
for (unsigned int a = 0; a < vClients.size(); a++) {
|
||||
CClient* pClient = vClients[a];
|
||||
|
||||
if (pClient != this) {
|
||||
pClient->PutClient(":" + GetNickMask() + " NOTICE " + sTarget + " :" + sMsg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
PutIRC("NOTICE " + sTarget + " :" + sMsg);
|
||||
return;
|
||||
} else if (sCommand.CaseCmp("PRIVMSG") == 0) {
|
||||
@@ -383,6 +396,19 @@ void CClient::ReadLine(const CString& sData) {
|
||||
if (pChan && pChan->KeepBuffer()) {
|
||||
pChan->AddBuffer(":" + GetNickMask() + " PRIVMSG " + sTarget + " :\001" + sCTCP + "\001");
|
||||
}
|
||||
|
||||
// Relay to the rest of the clients that may be connected to this user
|
||||
if (m_pUser && m_pUser->IsChan(sTarget)) {
|
||||
vector<CClient*>& vClients = m_pUser->GetClients();
|
||||
|
||||
for (unsigned int a = 0; a < vClients.size(); a++) {
|
||||
CClient* pClient = vClients[a];
|
||||
|
||||
if (pClient != this) {
|
||||
pClient->PutClient(":" + GetNickMask() + " PRIVMSG " + sTarget + " :\001" + sCTCP + "\001");
|
||||
}
|
||||
}
|
||||
}
|
||||
#ifdef _MODULES
|
||||
} else {
|
||||
MODULECALL(OnUserCTCP(sTarget, sCTCP), m_pUser, this, return);
|
||||
|
||||
Reference in New Issue
Block a user