Esempio n. 1
0
 public void BanByName(string name)
 {
     if (CoopPeerStarter.Dedicated && CoopSteamClientStarter.IsAdmin)
     {
         CoopAdminCommand.Send("ban", name);
     }
     else
     {
         BoltEntity entityFromName = MpPlayerList.GetEntityFromName(name, null);
         if (entityFromName)
         {
             CoopKick.BanPlayer(entityFromName);
             base.Invoke("Refresh", 0.1f);
         }
     }
 }
Esempio n. 2
0
 public void KickByName(string name)
 {
     if (CoopPeerStarter.Dedicated && CoopSteamClientStarter.IsAdmin)
     {
         CoopAdminCommand.Send("kick", name);
     }
     else
     {
         BoltEntity entityFromName = MpPlayerList.GetEntityFromName(name, null);
         if (entityFromName)
         {
             CoopKick.KickPlayer(entityFromName, -1, "HOST_KICKED_YOU");
             base.Invoke("Refresh", 0.1f);
         }
     }
 }