fix /tog command
This commit is contained in:
@@ -70,7 +70,10 @@ namespace ReallifeGamemode.Server.Events
|
||||
{
|
||||
Autowanted.Check_AutoWanted(killer, player);
|
||||
string message = "~y~[HINWEIS]: " + killer.Name + " hat " + player.Name + " getötet (" + Managers.WeaponManager.GetCauseOfDeathByHash(reason) + ")";
|
||||
ChatService.BroadcastAdmin(message, AdminLevel.ADMIN);
|
||||
ChatService.BroadcastAdmin(message, AdminLevel.ADMIN, shouldSendMessage: admin =>
|
||||
{
|
||||
return admin.HasData("togdeath");
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -92,15 +92,30 @@ namespace ReallifeGamemode.Server.Events
|
||||
ChatService.BroadcastGroup(msg, user.Group);
|
||||
}
|
||||
|
||||
string message = string.Empty;
|
||||
|
||||
if (GlobalHelper.CustomJoinMessages.ContainsKey(player.SocialClubName))
|
||||
{
|
||||
ChatService.BroadcastAdmin("!{#FFFF00}*** " + GlobalHelper.CustomJoinMessages[player.SocialClubName] + " [ID: " + player.Handle.Value + "] (" + user.AdminLevel.GetName() + ")", AdminLevel.MAPPING);
|
||||
message = "!{#FFFF00}*** " + GlobalHelper.CustomJoinMessages[player.SocialClubName] + " [ID: " + player.Handle.Value + "] (" + user.AdminLevel.GetName() + ")");
|
||||
}
|
||||
else if (user.IsAdmin(AdminLevel.MAPPING))
|
||||
{
|
||||
ChatService.BroadcastAdmin("!{#FFFF00}*** " + user.Name + " [ID: " + player.Handle.Value + "]" + " hat sich als " + user.AdminLevel.GetName() + " eingeloggt!", AdminLevel.MAPPING);
|
||||
message = "!{#FFFF00}*** " + user.Name + " [ID: " + player.Handle.Value + "]" + " hat sich als " + user.AdminLevel.GetName() + " eingeloggt!";
|
||||
}
|
||||
|
||||
string addInfoStr = " (IP: " + player.Address + ")";
|
||||
|
||||
if(!string.IsNullOrEmpty(message))
|
||||
{
|
||||
ChatService.BroadcastAdmin(message, AdminLevel.MAPPING, admin =>
|
||||
{
|
||||
if(admin.HasData("togip"))
|
||||
{
|
||||
return addInfoStr;
|
||||
}
|
||||
return "";
|
||||
});
|
||||
}
|
||||
|
||||
var userItems = dbContext.UserItems.Where(u => u.UserId == user.Id).ToList();
|
||||
player.SetData("items", userItems);
|
||||
|
||||
Reference in New Issue
Block a user