Fill in the VHostLoop for both editing and new users

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@683 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
prozacx
2006-03-12 22:22:31 +00:00
parent 31a56a5cbd
commit ebd57d65c7

View File

@@ -770,18 +770,6 @@ bool CWebAdminSock::UserPage(CString& sPageRet, CUser* pUser) {
}
}
const VCString& vsVHosts = CZNC::Get().GetVHosts();
for (unsigned int b = 0; b < vsVHosts.size(); b++) {
const CString& sVHost = vsVHosts[b];
CTemplate& l = m_Template.AddRow("VHostLoop");
l["VHost"] = sVHost;
if (pUser && pUser->GetVHost() == sVHost) {
l["Checked"] = "true";
}
}
const vector<CChan*>& Channels = pUser->GetChans();
for (unsigned int c = 0; c < Channels.size(); c++) {
CChan* pChan = Channels[c];
@@ -805,6 +793,18 @@ bool CWebAdminSock::UserPage(CString& sPageRet, CUser* pUser) {
m_Template["StatusPrefix"] = "*";
}
const VCString& vsVHosts = CZNC::Get().GetVHosts();
for (unsigned int b = 0; b < vsVHosts.size(); b++) {
const CString& sVHost = vsVHosts[b];
CTemplate& l = m_Template.AddRow("VHostLoop");
l["VHost"] = sVHost;
if (pUser && pUser->GetVHost() == sVHost) {
l["Checked"] = "true";
}
}
set<CModInfo> ssUserMods;
CZNC::Get().GetModules().GetAvailableMods(ssUserMods);