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:
Alexey Sokolov
2022-10-28 23:18:43 +01:00
parent 32d4a4d580
commit c55237be0b
2 changed files with 6 additions and 10 deletions
+2 -9
View File
@@ -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);