aboutsummaryrefslogtreecommitdiffstats
path: root/src/server/Main.hx
diff options
context:
space:
mode:
authorRblSb <msrblsb@gmail.com>2020-07-29 18:09:20 +0300
committerRblSb <msrblsb@gmail.com>2020-07-30 19:04:21 +0300
commit7df8a33c7b1c6cc7d18bde2586a3224b02686a95 (patch)
treea5b22abda535d9a4ae799f1a76f4f3d3103eb4e3 /src/server/Main.hx
parent328c05713f968ccce7a63c934dce873dc7967d6a (diff)
Exit messages
Diffstat (limited to 'src/server/Main.hx')
-rw-r--r--src/server/Main.hx11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/server/Main.hx b/src/server/Main.hx
index 85006c7..8a5f381 100644
--- a/src/server/Main.hx
+++ b/src/server/Main.hx
@@ -110,9 +110,6 @@ class Main {
continue;
}
client.ws.terminate();
- onMessage(client, {
- type: Disconnected
- }, true);
}
};
}
@@ -364,6 +361,14 @@ class Main {
if (waitVideoStart != null) waitVideoStart.stop();
videoTimer.pause();
}
+ Timer.delay(() -> {
+ if (clients.exists(i -> i.name == client.name)) return;
+ broadcast({
+ type: ServerMessage, serverMessage: {
+ textId: '${client.name} has left'
+ }
+ });
+ }, 5000);
case UpdateClients:
sendClientList();
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage