/tog d & ga

This commit is contained in:
hydrant
2021-04-20 23:41:22 +02:00
parent e3a9b0d7e5
commit d12f10fbb4
3 changed files with 29 additions and 6 deletions

View File

@@ -74,7 +74,7 @@ namespace ReallifeGamemode.Server.Commands
User user = player.GetUser(dbContext);
Faction f = user?.Faction;
if ((f == null || !f.GangOwned) && !user.IsAdmin(AdminLevel.ADMIN))
if ((f == null || !f.GangOwned) && !user.IsAdmin(AdminLevel.ADMIN) && !player.HasData("togga"))
{
ChatService.NotAuthorized(player);
return;
@@ -105,7 +105,7 @@ namespace ReallifeGamemode.Server.Commands
string broadcastMessage = "!{FF0000}** " + rank + " " + player.Name + ": " + message + " **";
using (var context = new DatabaseContext())
{
ChatService.BroadcastFaction(broadcastMessage, context.Factions.ToList().FindAll(c => c.GangOwned), true);
ChatService.BroadcastFaction(broadcastMessage, context.Factions.ToList().FindAll(c => c.GangOwned), true, (admin) => admin.HasData("togga"));
}
}
@@ -154,7 +154,7 @@ namespace ReallifeGamemode.Server.Commands
User user = player.GetUser(dbContext);
Faction f = user?.Faction;
if ((f == null || !f.StateOwned) && !user.IsAdmin(AdminLevel.ADMIN))
if ((f == null || !f.StateOwned) && !user.IsAdmin(AdminLevel.ADMIN) && !player.HasData("todg"))
{
ChatService.NotAuthorized(player);
return;
@@ -185,7 +185,7 @@ namespace ReallifeGamemode.Server.Commands
string broadcastMessage = "!{CC3333}** " + factionName + " " + player.Name + ": " + message + ", over **";
using (var context = new DatabaseContext())
{
ChatService.BroadcastFaction(broadcastMessage, context.Factions.ToList().FindAll(c => c.StateOwned), true);
ChatService.BroadcastFaction(broadcastMessage, context.Factions.ToList().FindAll(c => c.StateOwned), true, (admin) => admin.HasData("togd"));
}
}