internal void WorkRoomChatServerMessageThread() { if (roomChatServerMessages.Count > 0) { lock (roomChatServerMessages.SyncRoot) { while (roomChatServerMessages.Count > 0) { RoomChat Chat = (RoomChat)roomChatServerMessages.Dequeue(); lock (GetRoomUserManager().UserList) { foreach (var user in GetRoomUserManager().UserList.Values) { if (!ChatCheck(user, Chat.GetParent())) { continue; } user.GetClient().SendMessage(Chat.GenerateMessage(user.GetClient().GetHabbo().preferOldChat)); OtanixEnvironment.GetGame().CorManager().atualizaNomePraNormal(user.GetClient()); } } } } } }
internal void SendChatMessage(RoomChat Chat) { if (Chat == null) { return; } lock (roomChatServerMessages.SyncRoot) { roomChatServerMessages.Enqueue(Chat); } }
internal void OnChat(InvokedChatMessage message) { #region Progress var Message = message.message; // mejoramos el mensaje. if (GetRoom() == null || GetRoom().SayWired(this, Message)) // si la sala es nula o no se muestra (es wired) { return; } RoomChat Chat = new RoomChat(this, message); GetRoom().SendChatMessage(Chat); // GetRoom().GetRoomUserManager().TurnHeads(X, Y, HabboId); if (!IsBot) { GetRoom().OnUserSay(this, Message, message.shout); } message.Dispose(); #endregion }