mirror of
https://github.com/znc/znc.git
synced 2026-08-06 08:52:57 +02:00
Make CUser::Put* send to all clients
Instead of only networkless clients, which is a very rare case, because
most clients are connected to some network. This resulted in
CModule::PutModule to sometimes have no effect.
I fixed CUser::PutStatus and PutStatusNotice back in 2011 in
0b6d609014, but missed these 3 functions.
Deprecate CUser::PutAllUser() which is now essentially alias to
CUser::PutUser().
This commit is contained in:
+2
-9
@@ -1105,13 +1105,6 @@ bool CUser::PutUser(const CString& sLine, CClient* pClient,
|
||||
}
|
||||
}
|
||||
|
||||
return (pClient == nullptr);
|
||||
}
|
||||
|
||||
bool CUser::PutAllUser(const CString& sLine, CClient* pClient,
|
||||
CClient* pSkipClient) {
|
||||
PutUser(sLine, pClient, pSkipClient);
|
||||
|
||||
for (CIRCNetwork* pNetwork : m_vIRCNetworks) {
|
||||
if (pNetwork->PutUser(sLine, pClient, pSkipClient)) {
|
||||
return true;
|
||||
@@ -1157,7 +1150,7 @@ bool CUser::PutStatusNotice(const CString& sLine, CClient* pClient,
|
||||
|
||||
bool CUser::PutModule(const CString& sModule, const CString& sLine,
|
||||
CClient* pClient, CClient* pSkipClient) {
|
||||
for (CClient* pEachClient : m_vClients) {
|
||||
for (CClient* pEachClient : GetAllClients()) {
|
||||
if ((!pClient || pClient == pEachClient) &&
|
||||
pSkipClient != pEachClient) {
|
||||
pEachClient->PutModule(sModule, sLine);
|
||||
@@ -1173,7 +1166,7 @@ bool CUser::PutModule(const CString& sModule, const CString& sLine,
|
||||
|
||||
bool CUser::PutModNotice(const CString& sModule, const CString& sLine,
|
||||
CClient* pClient, CClient* pSkipClient) {
|
||||
for (CClient* pEachClient : m_vClients) {
|
||||
for (CClient* pEachClient : GetAllClients()) {
|
||||
if ((!pClient || pClient == pEachClient) &&
|
||||
pSkipClient != pEachClient) {
|
||||
pEachClient->PutModNotice(sModule, sLine);
|
||||
|
||||
Reference in New Issue
Block a user