Some changes to the vhost interface from *status

This adds AddVHost, RemVHost and ListVHosts.
If this vhost list (which is the same webadmin uses for displaying drop-down
lists) is none-empty, then users can only set one of these vhosts via SetVHost.
If the list is empty, everything is allowed.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1256 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2008-10-20 13:00:54 +00:00
parent fa2a9819d0
commit ce31b29b68
2 changed files with 92 additions and 2 deletions

11
znc.cpp
View File

@@ -1593,8 +1593,15 @@ bool CZNC::AddVHost(const CString& sHost) {
}
bool CZNC::RemVHost(const CString& sHost) {
// @todo
return true;
VCString::iterator it;
for (it = m_vsVHosts.begin(); it != m_vsVHosts.end(); it++) {
if (sHost.Equals(*it)) {
m_vsVHosts.erase(it);
return true;
}
}
return false;
}
void CZNC::Broadcast(const CString& sMessage, bool bAdminOnly,