Skip to content

Commit

Permalink
Fix CZNC::Broadcast...
Browse files Browse the repository at this point in the history
We need a good way to speak to users, not just sending some clients some
stuff...

Thanks to Cronus` for reporting this, as notify_connect failed for him
when using broken broadcast.
  • Loading branch information
Alexey Sokolov committed Nov 3, 2011
1 parent a08ec52 commit 0b6d609
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/User.cpp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -905,9 +905,10 @@ bool CUser::PutAllUser(const CString& sLine, CClient* pClient, CClient* pSkipCli
} }


bool CUser::PutStatus(const CString& sLine, CClient* pClient, CClient* pSkipClient) { bool CUser::PutStatus(const CString& sLine, CClient* pClient, CClient* pSkipClient) {
for (unsigned int a = 0; a < m_vClients.size(); a++) { vector<CClient*> vClients = GetAllClients();
if ((!pClient || pClient == m_vClients[a]) && pSkipClient != m_vClients[a]) { for (unsigned int a = 0; a < vClients.size(); a++) {
m_vClients[a]->PutStatus(sLine); if ((!pClient || pClient == vClients[a]) && pSkipClient != vClients[a]) {
vClients[a]->PutStatus(sLine);


if (pClient) { if (pClient) {
return true; return true;
Expand All @@ -919,9 +920,10 @@ bool CUser::PutStatus(const CString& sLine, CClient* pClient, CClient* pSkipClie
} }


bool CUser::PutStatusNotice(const CString& sLine, CClient* pClient, CClient* pSkipClient) { bool CUser::PutStatusNotice(const CString& sLine, CClient* pClient, CClient* pSkipClient) {
for (unsigned int a = 0; a < m_vClients.size(); a++) { vector<CClient*> vClients = GetAllClients();
if ((!pClient || pClient == m_vClients[a]) && pSkipClient != m_vClients[a]) { for (unsigned int a = 0; a < vClients.size(); a++) {
m_vClients[a]->PutStatusNotice(sLine); if ((!pClient || pClient == vClients[a]) && pSkipClient != vClients[a]) {
vClients[a]->PutStatusNotice(sLine);


if (pClient) { if (pClient) {
return true; return true;
Expand Down

0 comments on commit 0b6d609

Please sign in to comment.