mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
Create EModuleType, creating SetType which replaces SetGlobal
This commit is contained in:
@@ -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->IsGlobal() && pModule->GetUser() != GetSession()->GetUser()) {
|
||||
} else if (pModule->GetType() != ModuleTypeGlobal && 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->IsGlobal() && (!IsLoggedIn() || pModule->GetUser() != GetSession()->GetUser())) {
|
||||
if (pModule && pModule->GetType() != ModuleTypeGlobal && (!IsLoggedIn() || pModule->GetUser() != GetSession()->GetUser())) {
|
||||
AddModLoop("UserModLoop", *pModule);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user