Ejemplo n.º 1
0
        internal void AddMessage(ChatMessage message)
        {
            listOfMessages.AddFirst(message);

            if (amountOfMessagesInside == 100)
                listOfMessages.RemoveLast();
            else
                amountOfMessagesInside++;
        }
Ejemplo n.º 2
0
        internal static ChatMessage CreateMessage(string message, GameClient user, Room room)
        {
            uint userID = user.GetHabbo().Id;
            string username = user.GetHabbo().Username;
            uint roomID = room.RoomId;
            string roomName = room.Name;
            bool isPublic = room.IsPublic;
            DateTime timeSpoken = DateTime.Now;

            ChatMessage chatMessage = new ChatMessage(userID, username, roomID, roomName, isPublic, message, timeSpoken);
            return chatMessage;
        }