mirror of
https://github.com/znc/znc.git
synced 2026-08-07 09:22:55 +02:00
Added missing IsAdmin checks to the admin module. DenyLoadMod and DenySetVHost are now properly adhered to.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1743 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
+13
-5
@@ -197,8 +197,12 @@ class CAdminMod : public CModule {
|
||||
PutModule("RealName = " + value);
|
||||
}
|
||||
else if (var == "vhost") {
|
||||
user->SetVHost(value);
|
||||
PutModule("VHost = " + value);
|
||||
if(!user->DenySetVHost() || m_pUser->IsAdmin()) {
|
||||
user->SetVHost(value);
|
||||
PutModule("VHost = " + value);
|
||||
} else {
|
||||
PutModule("Access denied!");
|
||||
}
|
||||
}
|
||||
else if (var == "multiclients") {
|
||||
bool b = value.ToBool();
|
||||
@@ -216,9 +220,13 @@ class CAdminMod : public CModule {
|
||||
PutModule("UseClientIP = " + CString(b));
|
||||
}
|
||||
else if (var == "denyloadmod") {
|
||||
bool b = value.ToBool();
|
||||
user->SetDenyLoadMod(b);
|
||||
PutModule("DenyLoadMod = " + CString(b));
|
||||
if(m_pUser->IsAdmin()) {
|
||||
bool b = value.ToBool();
|
||||
user->SetDenyLoadMod(b);
|
||||
PutModule("DenyLoadMod = " + CString(b));
|
||||
} else {
|
||||
PutModule("Access denied!");
|
||||
}
|
||||
}
|
||||
else if (var == "defaultchanmodes") {
|
||||
user->SetDefaultChanModes(value);
|
||||
|
||||
Reference in New Issue
Block a user