about summary refs log tree commit diff
path: root/src/game/server
diff options
context:
space:
mode:
authorJakob Fries <jakob.fries@gmail.com>2007-07-29 22:56:25 +0000
committerJakob Fries <jakob.fries@gmail.com>2007-07-29 22:56:25 +0000
commit8bfaea274e735a2f5331e6b76501299d29681c68 (patch)
treed0e5911f8c609b883ea2cf988b92c541a4f6a3af /src/game/server
parent3cbaf193c7edc31eedb23ba298341367df41128f (diff)
downloadzcatch-8bfaea274e735a2f5331e6b76501299d29681c68.tar.gz
zcatch-8bfaea274e735a2f5331e6b76501299d29681c68.zip
join and quit messages
Diffstat (limited to 'src/game/server')
-rw-r--r--src/game/server/game_server.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/game/server/game_server.cpp b/src/game/server/game_server.cpp
index f366b2c7..10760130 100644
--- a/src/game/server/game_server.cpp
+++ b/src/game/server/game_server.cpp
@@ -1753,10 +1753,13 @@ void mods_client_enter(int client_id)
 			server_send_msg(client_id);
 		}
 	}
+
+	mods_message(MSG_JOIN, client_id);
 }
 
 void mods_client_drop(int client_id)
 {
+	mods_message(MSG_QUIT, client_id);
 	dbg_msg("mods", "client drop %d", client_id);
 	world.remove_entity(&players[client_id]);
 	players[client_id].client_id = -1;
@@ -1779,6 +1782,20 @@ void mods_message(int msg, int client_id)
 		players[client_id].die(client_id, -1);
 		players[client_id].score--;
 	}
+	else if (msg == MSG_JOIN)
+	{
+		msg_pack_start(MSG_JOIN, MSGFLAG_VITAL);
+		msg_pack_int(client_id);
+		msg_pack_end();
+		server_send_msg(-1);
+	}
+	else if (msg == MSG_QUIT)
+	{
+		msg_pack_start(MSG_QUIT, MSGFLAG_VITAL);
+		msg_pack_int(client_id);
+		msg_pack_end();
+		server_send_msg(-1);
+	}
 }
 
 extern unsigned char internal_data[];