mirror of
https://github.com/znc/znc.git
synced 2026-05-09 14:54:53 +02:00
Don't allow users with 'DenyLoadMod' set to use 'ListAvailableModules'
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1063 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
@@ -1196,6 +1196,11 @@ void CClient::UserCommand(const CString& sLine) {
|
||||
return;
|
||||
} else if ((sCommand.CaseCmp("LISTAVAILMODS") == 0) || (sCommand.CaseCmp("LISTAVAILABLEMODULES") == 0)) {
|
||||
#ifdef _MODULES
|
||||
if (m_pUser->DenyLoadMod()) {
|
||||
PutStatus("Access Denied.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_pUser->IsAdmin()) {
|
||||
set<CModInfo> ssGlobalMods;
|
||||
CZNC::Get().GetModules().GetAvailableMods(ssGlobalMods, true);
|
||||
|
||||
Reference in New Issue
Block a user