mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
Add OnWebPreRequest web module hook to allow modules to do PAGE_DEFERRED style async processing.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1841 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
@@ -582,9 +582,11 @@ CWebSock::EPageReqResult CWebSock::OnPageRequestInternal(const CString& sURI, CS
|
||||
} else if (pModule->WebRequiresAdmin() && !m_spSession->IsAdmin()) {
|
||||
sPageRet = GetErrorPage(403, "Forbidden", "You need to be an admin to access this module");
|
||||
return PAGE_PRINT;
|
||||
} else if (pModule && !pModule->IsGlobal() && pModule->GetUser() != m_spSession->GetUser()) {
|
||||
} else if (!pModule->IsGlobal() && pModule->GetUser() != m_spSession->GetUser()) {
|
||||
sPageRet = GetErrorPage(403, "Forbidden", "You must login as " + pModule->GetUser()->GetUserName() + " in order to view this page");
|
||||
return PAGE_PRINT;
|
||||
} else if (pModule->OnWebPreRequest(*this, m_sPage)) {
|
||||
return PAGE_DEFERRED;
|
||||
}
|
||||
|
||||
VWebSubPages& vSubPages = pModule->GetSubPages();
|
||||
|
||||
Reference in New Issue
Block a user