mirror of
https://github.com/znc/znc.git
synced 2026-05-02 19:42:32 +02:00
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:
11
znc.cpp
11
znc.cpp
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user