mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
CUser: add API for removing and clearing allowed hosts
This commit is contained in:
@@ -791,6 +791,12 @@ bool CUser::AddAllowedHost(const CString& sHostMask) {
|
||||
m_ssAllowedHosts.insert(sHostMask);
|
||||
return true;
|
||||
}
|
||||
bool CUser::RemAllowedHost(const CString& sHostMask) {
|
||||
return m_ssAllowedHosts.erase(sHostMask) > 0;
|
||||
}
|
||||
void CUser::ClearAllowedHosts() {
|
||||
m_ssAllowedHosts.clear();
|
||||
}
|
||||
|
||||
bool CUser::IsHostAllowed(const CString& sHostMask) const {
|
||||
if (m_ssAllowedHosts.empty()) {
|
||||
|
||||
Reference in New Issue
Block a user