예제 #1
0
        internal virtual void OnChat(InvokedChatMessage message)
        {
            string Message = message.message;

            int ChatHeader = Outgoing.Talk;

            if (message.shout)
            {
                ChatHeader = Outgoing.Shout;
            }

            string Site = "";

            ServerMessage ChatMessage = new ServerMessage(ChatHeader);

            ChatMessage.AppendInt32(VirtualID);
            ChatMessage.AppendString(Message);

            if (!string.IsNullOrEmpty(Site))
            {
                ChatMessage.AppendBoolean(false);
                ChatMessage.AppendBoolean(true);
                ChatMessage.AppendString(Site.Replace("http://", string.Empty));
                ChatMessage.AppendString(Site);
            }

            ChatMessage.AppendInt32(0);
            ChatMessage.AppendInt32(0);
            ChatMessage.AppendInt32(-1);

            GetRoom().GetRoomUserManager().TurnHeads(X, Y, VirtualID);

            foreach (RoomUser user in GetRoom().GetRoomUserManager().GetRoomUsers())
            {
                if (user.GetClient().GetHabbo().MutedUsers.Contains(ID))
                {
                    continue;
                }

                user.GetClient().SendMessage(ChatMessage);
            }


            message.Dispose();
        }
예제 #2
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
        }
예제 #3
0
        internal void OnChat(InvokedChatMessage message)
        {
            string Message = message.message;

            if (GetRoom() != null && !GetRoom().AllowsShous(this, Message))
            {
                return;
            }

            uint ChatHeader = 24;

            if (message.shout)
            {
                ChatHeader = 26;
            }

            string Site = "";

            ServerMessage ChatMessage = new ServerMessage(ChatHeader);

            ChatMessage.AppendInt32(VirtualId);

            //if (Message.Contains("http://") || Message.Contains("www."))
            //{
            //    string[] Split = Message.Split(' ');

            //    foreach (string Msg in Split)
            //    {
            //        if (Msg.StartsWith("http://") || Msg.StartsWith("www."))
            //        {
            //            Site = Msg;
            //        }
            //    }

            //    Message = Message.Replace(Site, "{0}");
            //}

            ChatMessage.AppendStringWithBreak(Message);

            if (!string.IsNullOrEmpty(Site))
            {
                ChatMessage.AppendBoolean(false);
                ChatMessage.AppendBoolean(true);
                ChatMessage.AppendStringWithBreak(Site.Replace("http://", string.Empty));
                ChatMessage.AppendStringWithBreak(Site);
            }

            ChatMessage.AppendInt32(GetSpeechEmotion(Message));
            ChatMessage.AppendBoolean(false);

            GetRoom().GetRoomUserManager().TurnHeads(X, Y, HabboId);
            GetRoom().SendMessage(ChatMessage);

            if (!IsBot)
            {
                GetRoom().OnUserSay(this, Message, message.shout);
                LogMessage(Message);
            }

            message.Dispose();
        }