private void WorkRoomAlertQueue() { if (roomAlerts.Count > 0) { lock (roomAlerts.SyncRoot) { while (roomAlerts.Count > 0) { RoomAlert alert = (RoomAlert)roomAlerts.Dequeue(); foreach (RoomUser user in roomUserManager.UserList.Values) { if (user.IsBot) { continue; } if (user.GetClient().GetHabbo().Rank >= alert.minrank) { continue; } user.GetClient().SendNotif(alert.message, false); } } } } }
internal void QueueRoomAlert(RoomAlert alert) { lock (roomAlerts.SyncRoot) { roomAlerts.Enqueue(alert); } }
private void OnRoomUpdate(RoomAlert alert) { People = alert.PeopleInRoom.Aggregate((a, b) => $"{a}, {b}"); Interactions = alert.Interactions.ToList().AsReadOnly(); Notify("People"); Notify("Interactions"); }
internal static void RoomAlert(uint RoomId, Boolean Caution, String Message) { Room Room = FirewindEnvironment.GetGame().GetRoomManager().GetRoom(RoomId); if (Room == null || Message.Length <= 1) { return; } RoomAlert alert = new RoomAlert(Message, 3); }