Remove flawed Add/Del/List/BindHost(s) (close #983)

This commit is contained in:
J-P Nurmi
2015-08-17 15:22:20 +02:00
parent 6bfe7d840f
commit d19a040f2d
8 changed files with 28 additions and 314 deletions
-35
View File
@@ -290,23 +290,6 @@ class CAdminMod : public CModule {
return;
}
const VCString& vsHosts = CZNC::Get().GetBindHosts();
if (!GetUser()->IsAdmin() && !vsHosts.empty()) {
bool bFound = false;
for (const CString& sHost : vsHosts) {
if (sValue.Equals(sHost)) {
bFound = true;
break;
}
}
if (!bFound) {
PutModule("You may not use this bind host. See /msg " + GetUser()->GetStatusPrefix() + "status ListBindHosts for a list");
return;
}
}
pUser->SetBindHost(sValue);
PutModule("BindHost = " + sValue);
} else {
@@ -563,24 +546,6 @@ class CAdminMod : public CModule {
return;
}
const VCString& vsHosts = CZNC::Get().GetBindHosts();
if (!GetUser()->IsAdmin() && !vsHosts.empty()) {
VCString::const_iterator it;
bool bFound = false;
for (const CString& sHost : vsHosts) {
if (sValue.Equals(sHost)) {
bFound = true;
break;
}
}
if (!bFound) {
PutModule("You may not use this bind host. See /msg " + GetUser()->GetStatusPrefix() + "status ListBindHosts for a list");
return;
}
}
pNetwork->SetBindHost(sValue);
PutModule("BindHost = " + sValue);
} else {