random checks
This commit is contained in:
parent
1e679ff0c6
commit
5593664df5
@ -29,6 +29,9 @@ namespace NadekoBot.Classes.Permissions {
|
||||
public bool CanRun(Command command, User user, Channel channel, out string error) {
|
||||
error = String.Empty;
|
||||
|
||||
if (channel.IsPrivate || channel.Server == null)
|
||||
return command.Category == "Help";
|
||||
|
||||
if (ConfigHandler.IsUserBlacklisted(user.Id) ||
|
||||
(!channel.IsPrivate &&
|
||||
(ConfigHandler.IsServerBlacklisted(channel.Server.Id) || ConfigHandler.IsChannelBlacklisted(channel.Id)))) {
|
||||
@ -38,9 +41,6 @@ namespace NadekoBot.Classes.Permissions {
|
||||
if (timeBlackList.ContainsKey(user))
|
||||
return false;
|
||||
|
||||
if (channel.IsPrivate)
|
||||
return command.Category == "Help";
|
||||
|
||||
timeBlackList.TryAdd(user, DateTime.Now);
|
||||
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user