Permalink
Browse files

Fix CZNC::Broadcast...

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...
1 parent a08ec52 commit 0b6d609014e6795773481b71c3428891a350d609 Alexey Sokolov committed Nov 3, 2011
Showing with 8 additions and 6 deletions.
  1. +8 −6 src/User.cpp
View
@@ -905,9 +905,10 @@ bool CUser::PutAllUser(const CString& sLine, CClient* pClient, CClient* pSkipCli
}
bool CUser::PutStatus(const CString& sLine, CClient* pClient, CClient* pSkipClient) {
- for (unsigned int a = 0; a < m_vClients.size(); a++) {
- if ((!pClient || pClient == m_vClients[a]) && pSkipClient != m_vClients[a]) {
- m_vClients[a]->PutStatus(sLine);
+ vector<CClient*> vClients = GetAllClients();
+ for (unsigned int a = 0; a < vClients.size(); a++) {
+ if ((!pClient || pClient == vClients[a]) && pSkipClient != vClients[a]) {
+ vClients[a]->PutStatus(sLine);
if (pClient) {
return true;
@@ -919,9 +920,10 @@ bool CUser::PutStatus(const CString& sLine, CClient* pClient, CClient* pSkipClie
}
bool CUser::PutStatusNotice(const CString& sLine, CClient* pClient, CClient* pSkipClient) {
- for (unsigned int a = 0; a < m_vClients.size(); a++) {
- if ((!pClient || pClient == m_vClients[a]) && pSkipClient != m_vClients[a]) {
- m_vClients[a]->PutStatusNotice(sLine);
+ vector<CClient*> vClients = GetAllClients();
+ for (unsigned int a = 0; a < vClients.size(); a++) {
+ if ((!pClient || pClient == vClients[a]) && pSkipClient != vClients[a]) {
+ vClients[a]->PutStatusNotice(sLine);
if (pClient) {
return true;

0 comments on commit 0b6d609

Please sign in to comment.