summaryrefslogtreecommitdiff
path: root/src/commandHandler.hpp
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2025-03-21 18:09:05 +0800
committerlittleblack111 <littleblack11111@gmail.com>2025-03-22 15:02:46 +0800
commit3e19bf603af0ac01f6690afe7cf59702a4a5cc02 (patch)
treeb8ee33d721aa200364617239aab557639b5003c5 /src/commandHandler.hpp
parent97d82139d2011a790c0d3d254add5d800de2742f (diff)
feat(commands): client execute commands (#8)
refactor(session): writeChat, unify written chat internal: removed `CChatManager::broadcastMessage`, just use `g_pSessionManager->broadcastChat(msg)`
Diffstat (limited to 'src/commandHandler.hpp')
-rw-r--r--src/commandHandler.hpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/commandHandler.hpp b/src/commandHandler.hpp
index 78ab2e5..8d97fd5 100644
--- a/src/commandHandler.hpp
+++ b/src/commandHandler.hpp
@@ -3,6 +3,7 @@
#include <any>
#include <functional>
#include <memory>
+#include <netinet/in.h>
#include <string>
#include <vector>
@@ -32,6 +33,7 @@ class CCommandHandler {
// return false if command struct is invalid
bool registerCommand(const SCommand &command);
SResult newCommand(const std::string &command, const std::string &args) const;
+ void handleCommand(std::string input, const char ip[INET_ADDRSTRLEN] = {}) const;
template <typename T>
struct SMakeCommandArgs {