WebMods: Clean some stuff up

This removes two unused methods (ResolveModule() and FillErrorPage()) and marks
some other methods const/static/protected.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2236 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2010-12-31 16:15:53 +00:00
parent 3f62466751
commit 5050b93658
2 changed files with 13 additions and 49 deletions
+2 -29
View File
@@ -160,34 +160,7 @@ void CWebSock::ParsePath() {
DEBUG("Path [" + m_sPath + "], Module [" + m_sModName + "], Page [" + m_sPage + "]");
}
CModule* CWebSock::ResolveModule() {
ParsePath();
CModule* pModRet = NULL;
// Dot means static file, not module
if (m_sModName.find(".") != CString::npos) {
return NULL;
}
// This could be user level or global level, check both
pModRet = CZNC::Get().GetModules().FindModule(m_sModName);
if (!pModRet) {
if (!ForceLogin()) {
return NULL;
}
pModRet = GetSession()->GetUser()->GetModules().FindModule(m_sModName);
}
if (!pModRet) {
DEBUG("Module not found");
}
return pModRet;
}
size_t CWebSock::GetAvailSkins(vector<CFile>& vRet) {
size_t CWebSock::GetAvailSkins(vector<CFile>& vRet) const {
vRet.clear();
CString sRoot(GetSkinPath("_default_"));
@@ -436,7 +409,7 @@ CWebSock::EPageReqResult CWebSock::PrintTemplate(const CString& sPageName, CStri
}
}
CString CWebSock::GetSkinPath(const CString& sSkinName) const {
CString CWebSock::GetSkinPath(const CString& sSkinName) {
CString sRet = CZNC::Get().GetZNCPath() + "/webskins/" + sSkinName;
if (!CFile::IsDir(sRet)) {