GetUserGroups() public method

public GetUserGroups ( string user ) : List
user string
return List
Exemplo n.º 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;
 }
Exemplo n.º 2
0
        public static bool MayUseCommand(Command command, MinecraftClient 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);
        }
Exemplo n.º 3
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;
 }