Beispiel #1
0
 static bool CheckBanned(Group group, Player p, bool whitelisted)
 {
     if (Server.bannedIP.Contains(p.ip) && (!Server.useWhitelist || !whitelisted))
     {
         p.Kick(null, Server.defaultBanMessage, true);
         return(false);
     }
     if (group.Permission == LevelPermission.Banned)
     {
         string[] data = Ban.GetBanData(p.name);
         if (data != null)
         {
             p.Kick(null, Ban.FormatBan(data[0], data[1]), true);
         }
         else
         {
             p.Kick(null, Server.defaultBanMessage, true);
         }
         return(false);
     }
     return(true);
 }