summaryrefslogtreecommitdiffstats
path: root/src/GlobalState.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/GlobalState.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/GlobalState.cpp b/src/GlobalState.cpp
index 49dbf2b..78fba0e 100644
--- a/src/GlobalState.cpp
+++ b/src/GlobalState.cpp
@@ -78,13 +78,16 @@ void InitEvents() {
});
listener.RegisterHandler(EventType::Disconnected, [](EventData eventData) {
- std::this_thread::sleep_for(std::chrono::milliseconds(500));
if (!gs)
return;
isPhysRunning = false;
threadPhys.join();
gs.reset();
});
+
+ listener.RegisterHandler(EventType::SendChatMessage, [](EventData eventData) {
+ nc->SendPacket(std::make_shared<PacketChatMessageSB>(std::get<SendChatMessageData>(eventData).message));
+ });
}
void PhysExec() {