add some server commands

This commit is contained in:
2025-04-17 21:59:14 -05:00
parent 9147787fd2
commit 600d0f3c81
4 changed files with 22 additions and 1 deletions

View File

@@ -26,6 +26,13 @@ bool ChatServer::onEvent(const Archimedes::Event& event) {
static std::string s; s = std::string((const char*)e.msg->m_pData, e.msg->m_cbSize);
if(s == "/quit") {
sm->disconnectClient(e.msg->m_conn);
} else if(s == "/shutdown") {
sm->stopServer();
app->end();
}
std::cerr << "Server Recieved: " << s << std::endl;
for(auto& it : sm->getClients()) {