コード例 #1
0
        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());
                            }
                        }
                    }
                }
            }
        }
コード例 #2
0
        internal void SendChatMessage(RoomChat Chat)
        {
            if (Chat == null)
            {
                return;
            }

            lock (roomChatServerMessages.SyncRoot)
            {
                roomChatServerMessages.Enqueue(Chat);
            }
        }
コード例 #3
0
        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
        }