示例#1
0
 public static bool MayUseCommand(Command command, RemoteClient user, Server server)
 {
     if (user is ConsoleClient)
         return true;
     var groups = server.GetUserGroups(user.Username);
     foreach (var group in groups)
     {
         if (command.AllowedGroups.Contains(group))
             return true;
     }
     return false;
 }