diff --git a/src/citron/multiplayer/chat_room.h b/src/citron/multiplayer/chat_room.h index c6277cdf7..2b34db41c 100644 --- a/src/citron/multiplayer/chat_room.h +++ b/src/citron/multiplayer/chat_room.h @@ -4,6 +4,8 @@ #pragma once +#include // time tracking +#include // storing timestamps #include #include #include @@ -49,6 +51,8 @@ public slots: void OnSendChat(); void OnChatTextChanged(); void PopupContextMenu(const QPoint& menu_location); + void OnChatContextMenu(const QPoint& menu_location); + void OnPlayerDoubleClicked(const QModelIndex& index); void Disable(); void Enable(); void UpdateTheme(); @@ -69,7 +73,13 @@ private: std::unique_ptr ui; std::unordered_set block_list; std::unordered_map icon_cache; - Network::RoomNetwork* room_network = nullptr; // Initialize to nullptr + std::unordered_map color_overrides; + bool chat_muted = false; + bool show_timestamps = true; + Network::RoomNetwork* room_network = nullptr; + std::vector sent_message_timestamps; + static constexpr size_t MAX_MESSAGES_PER_INTERVAL = 3; + static constexpr std::chrono::seconds THROTTLE_INTERVAL{5}; }; Q_DECLARE_METATYPE(Network::ChatEntry);