From 131dc244e67e3b6e9304e7076c397c761860044c Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Mon, 10 Mar 2025 18:36:00 +0800 Subject: fix(registerName): no longer allow same name the previous behaviour was it wouldn't broadcast the message to the same name debug: more logging, maybe we should disable TRACE by default in the future? WIP: partial impl of signal handling(SIGINT(keyboardinterrupt) etc) --- src/chatManager.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/chatManager.cpp') diff --git a/src/chatManager.cpp b/src/chatManager.cpp index 9711841..0ed3b60 100644 --- a/src/chatManager.cpp +++ b/src/chatManager.cpp @@ -1,11 +1,18 @@ #include "chatManager.hpp" #include "sessionManager.hpp" +#include "log.hpp" + +CChatManager::CChatManager() { + log(LOG, "ChatManager: initialized"); +} CChatManager::~CChatManager() { m_vMessages.clear(); + log(SYS, "ChatManager: bye"); } void CChatManager::newMessage(const SMessage &msg) { + log(LOG, "New message from {}: {}", msg.username, msg.msg); broadcastMessage(msg); m_vMessages.push_back(msg); } -- cgit v1.2.3