public static PlayerAlertsUpdateMessage SendLogUpdateToAdmin(NetworkConnection requestee, PlayerAlertsUpdate update) { PlayerAlertsUpdateMessage msg = new PlayerAlertsUpdateMessage { JsonData = JsonUtility.ToJson(update), IsSingleEntry = false }; msg.SendTo(requestee); return(msg); }
public static PlayerAlertsUpdateMessage SendSingleEntryToAdmins(PlayerAlertData alertMessage) { PlayerAlertsUpdateMessage msg = new PlayerAlertsUpdateMessage { JsonData = JsonUtility.ToJson(alertMessage), IsSingleEntry = true }; msg.SendToAdmins(); return(msg); }
public void ServerRequestEntries(string userId, int count, NetworkConnection requestee) { if (!PlayerList.Instance.IsAdmin(userId)) { return; } if (count >= serverPlayerAlerts.Count) { return; } PlayerAlertsUpdate update = new PlayerAlertsUpdate(); update.playerAlerts = serverPlayerAlerts; PlayerAlertsUpdateMessage.SendLogUpdateToAdmin(requestee, update); if (notifications.notifications.ContainsKey(NotificationKey)) { PlayerAlertNotifications.Send(requestee, notifications.notifications[NotificationKey]); } }
public void ServerSendEntryToAllAdmins(PlayerAlertData entry) { PlayerAlertsUpdateMessage.SendSingleEntryToAdmins(entry); }