/tog d & ga
This commit is contained in:
@@ -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"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user