diff --git a/ReallifeGamemode.Server/Commands/FactionCommands.cs b/ReallifeGamemode.Server/Commands/FactionCommands.cs index c5668041..dffffd3d 100644 --- a/ReallifeGamemode.Server/Commands/FactionCommands.cs +++ b/ReallifeGamemode.Server/Commands/FactionCommands.cs @@ -46,7 +46,7 @@ namespace ReallifeGamemode.Server.Commands { User user = player.GetUser(); Faction f = user?.Faction; - if (f == null || f.StateOwned) + if ((f == null || f.StateOwned) && !user.IsAdmin(AdminLevel.ADMIN)) { ChatService.NotAuthorized(player); return; @@ -180,7 +180,7 @@ namespace ReallifeGamemode.Server.Commands public void CmdFactionLc(Player player, string message) { User user = player.GetUser(); - if (user?.FactionId == null || user.FactionLeader == false || !user.IsAdmin(AdminLevel.ADMIN)) + if ((user?.FactionId == null || user.FactionLeader == false) && !user.IsAdmin(AdminLevel.ADMIN)) { ChatService.NotAuthorized(player); return; diff --git a/ReallifeGamemode.Server/Services/ChatService.cs b/ReallifeGamemode.Server/Services/ChatService.cs index d63d16c2..7ee17107 100644 --- a/ReallifeGamemode.Server/Services/ChatService.cs +++ b/ReallifeGamemode.Server/Services/ChatService.cs @@ -57,7 +57,7 @@ namespace ReallifeGamemode.Server.Services foreach (Player c in NAPI.Pools.GetAllPlayers()) { User user = c.GetUser(); - Faction f = user.Faction; + Faction f = user?.Faction; if (f != null) { if (factions.Find(fT => fT.Id == f.Id) != null)