fix connect logs

This commit is contained in:
hydrant
2021-04-11 15:39:25 +02:00
parent 30a6b6c4a3
commit 6a186635b5
2 changed files with 11 additions and 5 deletions

View File

@@ -280,6 +280,7 @@ namespace ReallifeGamemode.Server.Commands
player.SetData("toglc", true);
player.SendNotification("~g~[Info]~w~ Leaderchat wird nun angezeigt.");
}
break;
case "connect":
if (player.HasData("togconnect"))
{

View File

@@ -80,11 +80,16 @@ namespace ReallifeGamemode.Server.Events
bool disableLightMode = currentTime > LightModeTimeFrom && currentTime < LightModeTimeTo;
player.TriggerEvent("SERVER:Login_ShowBrowser", registered, disableLightMode);
string msg = "~m~*** " + player.Name + " [" + player.SocialClubName + "] [ID: " + player.Handle.Value + "] (" + player.Address + ")";
if(player.HasData("togconnect"))
{
ChatService.SendMessage(player, msg);
}
string msg = "~m~*** " + player.Name + " [" + player.SocialClubName + "] [ID: " + player.Handle.Value + "]";
string ipMsg = " (" + player.Address + ")";
ChatService.BroadcastAdmin(msg, AdminLevel.SUPPORTER, getAddInfoMessage: admin =>
{
return admin.HasData("togip") ? ipMsg : string.Empty;
},
shouldSendMessage: admin =>
{
return admin.HasData("togconnect");
});
}
private bool IsPlayerBanned(Player player)