Move the EModuleType into CModInfo

This also renames the values to shorter and more "well sounding" names.

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter
2011-08-21 16:30:36 +02:00
parent 5f53c3509f
commit cce40e9f71
12 changed files with 76 additions and 76 deletions
+2 -2
View File
@@ -639,7 +639,7 @@ CWebSock::EPageReqResult CWebSock::OnPageRequestInternal(const CString& sURI, CS
} else if (pModule->WebRequiresAdmin() && !GetSession()->IsAdmin()) {
PrintErrorPage(403, "Forbidden", "You need to be an admin to access this module");
return PAGE_DONE;
} else if (pModule->GetType() != ModuleTypeGlobal && pModule->GetUser() != GetSession()->GetUser()) {
} else if (pModule->GetType() != CModInfo::GlobalModule && pModule->GetUser() != GetSession()->GetUser()) {
PrintErrorPage(403, "Forbidden", "You must login as " + pModule->GetUser()->GetUserName() + " in order to view this page");
return PAGE_DONE;
} else if (pModule->OnWebPreRequest(*this, m_sPage)) {
@@ -659,7 +659,7 @@ CWebSock::EPageReqResult CWebSock::OnPageRequestInternal(const CString& sURI, CS
}
}
if (pModule && pModule->GetType() != ModuleTypeGlobal && (!IsLoggedIn() || pModule->GetUser() != GetSession()->GetUser())) {
if (pModule && pModule->GetType() != CModInfo::GlobalModule && (!IsLoggedIn() || pModule->GetUser() != GetSession()->GetUser())) {
AddModLoop("UserModLoop", *pModule);
}