(svn r6625) - Feature: Add the ability for servers to execute a script just after a client has connected, e.g. for a MOTD, etc.
authorpeter1138
Tue, 03 Oct 2006 14:59:05 +0000
changeset 4713 29313f34d770
parent 4712 4335ad42e163
child 4714 0975f8629da8
(svn r6625) - Feature: Add the ability for servers to execute a script just after a client has connected, e.g. for a MOTD, etc.
network_server.c
--- a/network_server.c	Tue Oct 03 14:52:39 2006 +0000
+++ b/network_server.c	Tue Oct 03 14:59:05 2006 +0000
@@ -954,6 +954,9 @@
 			DoCommandP(0, 0, 0, NULL, CMD_PAUSE);
 			NetworkServer_HandleChat(NETWORK_ACTION_CHAT, DESTTYPE_BROADCAST, 0, "Game unpaused (client connected)", NETWORK_SERVER_INDEX);
 		}
+
+		/* Execute script for, e.g. MOTD */
+		IConsoleCmdExec("exec scripts/on_server_connect.scr 0");
 	}
 
 	// The client received the frame, make note of it