fix: display login message to all players
authorxangelo <git@xangelo.ca>
Wed, 14 Jun 2023 08:45:20 +0000 (04:45 -0400)
committerxangelo <git@xangelo.ca>
Wed, 14 Jun 2023 08:45:20 +0000 (04:45 -0400)
src/server/api.ts

index 120547ee3ea42b3f7b1427f9a5f7175892c96404..361f1a8134a52271fcb422ac0157c2ef39f95b9a 100644 (file)
@@ -105,7 +105,7 @@ io.on('connection', async socket => {
   setServerStats();
   io.emit('chathistory', chatHistory);
 
-  socket.emit('login', broadcastMessage('server', `${player.username} just logged in`));
+  socket.emit('chat', broadcastMessage('server', `${player.username} just logged in`));
 
   socket.on('chat', (msg: string) => {
     if(msg.length > 0) {