mirror of
https://github.com/znc/znc.git
synced 2026-05-18 07:15:54 +02:00
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:
+2
-2
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user