CUser: add API for removing and clearing allowed hosts

This commit is contained in:
J-P Nurmi
2015-08-04 16:08:19 +02:00
parent 42501a3c61
commit dce289a5d4
2 changed files with 8 additions and 0 deletions

View File

@@ -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()) {