mirror of
https://github.com/znc/znc.git
synced 2026-05-02 03:22:33 +02:00
Add bAdminOnly and pSkipClient arguments to CZNC::Broadcast
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1070 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
11
znc.cpp
11
znc.cpp
@@ -1573,12 +1573,17 @@ bool CZNC::RemVHost(const CString& sHost) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void CZNC::Broadcast(const CString& sMessage, CUser* pUser) {
|
||||
void CZNC::Broadcast(const CString& sMessage, bool bAdminOnly,
|
||||
CUser* pSkipUser, CClient *pSkipClient) {
|
||||
for (map<CString,CUser*>::iterator a = m_msUsers.begin(); a != m_msUsers.end(); a++) {
|
||||
if (a->second != pUser) {
|
||||
if (bAdminOnly && !a->second->IsAdmin())
|
||||
continue;
|
||||
|
||||
if (a->second != pSkipUser) {
|
||||
CString sMsg = sMessage;
|
||||
|
||||
MODULECALL(OnBroadcast(sMsg), a->second, NULL, continue);
|
||||
a->second->PutStatusNotice("*** " + sMsg);
|
||||
a->second->PutStatusNotice("*** " + sMsg, NULL, pSkipClient);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user