Cleand up code, fixed unban

This commit is contained in:
hydrant
2018-09-30 00:46:16 +02:00
parent be028d5aab
commit 9b2a33d819
8 changed files with 193 additions and 235 deletions

View File

@@ -23,7 +23,7 @@ namespace reallife_gamemode.Server.Commands
[Command("f", "~m~Benutzung: ~s~/f [Nachricht]", GreedyArg = true)]
public void CmdFactionF(Client player, string message)
{
Entities.Faction f = player.GetFaction();
Entities.Faction f = player.GetUser()?.GetFaction();
if(f == null || f.StateOwned)
{
ChatService.NotAuthorized(player);
@@ -37,7 +37,7 @@ namespace reallife_gamemode.Server.Commands
[Command("r", "~m~Benutzung: ~s~/r [Nachricht]", GreedyArg = true)]
public void CmdFactionR(Client player, string message)
{
Entities.Faction f = player.GetFaction();
Entities.Faction f = player.GetUser()?.GetFaction();
if (f == null || !f.StateOwned)
{
ChatService.NotAuthorized(player);
@@ -51,7 +51,7 @@ namespace reallife_gamemode.Server.Commands
[Command("d", "~m~Benutzung: ~s~/d [Nachricht]", GreedyArg = true)]
public void CmdFactionD(Client player, string message)
{
Entities.Faction f = player.GetFaction();
Entities.Faction f = player.GetUser()?.GetFaction();
if (f == null || !f.StateOwned)
{
ChatService.NotAuthorized(player);