summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/sessionManager.cpp2
-rw-r--r--src/sessionManager.hpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/sessionManager.cpp b/src/sessionManager.cpp
index 85263f1..a7490e3 100644
--- a/src/sessionManager.cpp
+++ b/src/sessionManager.cpp
@@ -38,7 +38,7 @@ void CSessionManager::run() {
newSession();
}
-void CSessionManager::broadcast(const std::string &msg, eFormatType type) const {
+void CSessionManager::broadcast(eFormatType type, const std::string &msg) const {
for (const auto &[thread, session] : m_vSessions)
session->write(msg, type);
}
diff --git a/src/sessionManager.hpp b/src/sessionManager.hpp
index 4be5ce8..0f95dc9 100644
--- a/src/sessionManager.hpp
+++ b/src/sessionManager.hpp
@@ -14,7 +14,7 @@ class CSessionManager {
std::pair<std::jthread, std::shared_ptr<CSession>> *newSession();
void run();
- void broadcast(const std::string &msg, eFormatType type = NONE) const;
+ void broadcast(eFormatType type, const std::string &msg) const;
void kick(const CSession *session) const;
void addSession(const CSession &session);
void removeSession(std::pair<std::jthread, std::shared_ptr<CSession>> *session);