From 21c30c84d5ff719ce120e61b5917f5748955256b Mon Sep 17 00:00:00 2001 From: cflakes Date: Sun, 4 Apr 2010 18:35:59 +0000 Subject: [PATCH] Following revision 1880 the lastseen web page should only be visible for admin users. Thanks to psychon for noticing! :) git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1881 726aef4b-f618-498e-8847-2d620e286838 --- modules/extra/lastseen.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/extra/lastseen.cpp b/modules/extra/lastseen.cpp index a6fc37c5..27f6c6f5 100644 --- a/modules/extra/lastseen.cpp +++ b/modules/extra/lastseen.cpp @@ -90,7 +90,7 @@ public: // Web stuff: virtual bool WebRequiresLogin() { return true; } - virtual bool WebRequiresAdmin() { return false; } + virtual bool WebRequiresAdmin() { return true; } virtual CString GetWebMenuTitle() { return "Last Seen"; } virtual bool OnWebRequest(CWebSock& WebSock, const CString& sPageName, CTemplate& Tmpl) { @@ -122,8 +122,8 @@ public: } else { unsigned int uChans = 0; const vector& vChans = pUser->GetChans(); - for (unsigned int a = 0; a < vChans.size(); a++) { - if (vChans[a]->IsOn()) uChans++; + for (unsigned int a = 0; a < vChans.size(); ++a) { + if (vChans[a]->IsOn()) ++uChans; } Row["Info"] += ", joined to " + CString(uChans) + " channel(s)"; }