Lastseen module doesn't display links to webadmin webpages anymore if webadmin isn't loaded.

Patch by BrianC, thanks.

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2126 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
darthgandalf
2010-09-09 03:30:27 +00:00
parent 83f6366473
commit 70ae4bab6f
2 changed files with 14 additions and 4 deletions
+11 -1
View File
@@ -94,6 +94,16 @@ public:
virtual bool OnWebRequest(CWebSock& WebSock, const CString& sPageName, CTemplate& Tmpl) {
if (sPageName.empty() || sPageName == "index") {
CModules& GModules = CZNC::Get().GetModules();
if (GModules.size()) {
for (unsigned int b = 0; b < GModules.size(); b++) {
if(GModules[b]->GetModName().Equals("WEBADMIN")) {
Tmpl["WebAdminLoaded"] = "true";
break;
}
}
}
MTimeMulti mmSorted;
const MUsers& mUsers = CZNC::Get().GetUserMap();
@@ -134,7 +144,7 @@ public:
Row["Info"] += " channel" + CString(n == 1 ? "" : "s");
}
}
return true;
}