acm as well

This commit is contained in:
appelemac 2016-05-19 20:45:00 +02:00
parent 234a94e5fc
commit d9efa92124

View File

@ -559,7 +559,8 @@ namespace NadekoBot.Modules.Permissions
try
{
var state = PermissionHelper.ValidateBool(e.GetArg("bool"));
var channel = PermissionHelper.ValidateChannel(e.Server, e.GetArg("channel"));
var chArg = e.GetArg("channel");
var channel = string.IsNullOrWhiteSpace(chArg) ? e.Channel :PermissionHelper.ValidateChannel(e.Server, chArg);
foreach (var module in NadekoBot.Client.GetService<ModuleService>().Modules)
{
PermissionsHandler.SetChannelModulePermission(channel, module.Name, state);