mirror of
https://github.com/znc/znc.git
synced 2026-07-03 08:21:57 +02:00
Remove flawed Add/Del/List/BindHost(s) (close #983)
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user