summaryrefslogtreecommitdiffstats
path: root/src/GlobalState.cpp
diff options
context:
space:
mode:
authorLaG1924 <12997935+LaG1924@users.noreply.github.com>2017-10-14 18:40:34 +0200
committerLaG1924 <12997935+LaG1924@users.noreply.github.com>2018-01-13 03:39:32 +0100
commitabba018da3c2c8011b1485ee8e9e5b2690659c76 (patch)
tree88642b34e91957bbb5e6f05aca4107b512b7b4f2 /src/GlobalState.cpp
parent2017-10-09 (diff)
downloadAltCraft-abba018da3c2c8011b1485ee8e9e5b2690659c76.tar
AltCraft-abba018da3c2c8011b1485ee8e9e5b2690659c76.tar.gz
AltCraft-abba018da3c2c8011b1485ee8e9e5b2690659c76.tar.bz2
AltCraft-abba018da3c2c8011b1485ee8e9e5b2690659c76.tar.lz
AltCraft-abba018da3c2c8011b1485ee8e9e5b2690659c76.tar.xz
AltCraft-abba018da3c2c8011b1485ee8e9e5b2690659c76.tar.zst
AltCraft-abba018da3c2c8011b1485ee8e9e5b2690659c76.zip
Diffstat (limited to 'src/GlobalState.cpp')
-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() {