summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-10-03 14:59:05 +0000
committerpeter1138 <peter1138@openttd.org>2006-10-03 14:59:05 +0000
commitb1457a1cfc4113e058f2a04dc0f19f012959bffb (patch)
tree7c6e144b89ecaf83417f676086ec00095cbdec04
parentea63050d5f6e33e32917ff0df670638197a5ec05 (diff)
downloadopenttd-b1457a1cfc4113e058f2a04dc0f19f012959bffb.tar.xz
(svn r6625) - Feature: Add the ability for servers to execute a script just after a client has connected, e.g. for a MOTD, etc.
-rw-r--r--network_server.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/network_server.c b/network_server.c
index 79593247a..2c646b162 100644
--- a/network_server.c
+++ b/network_server.c
@@ -954,6 +954,9 @@ DEF_SERVER_RECEIVE_COMMAND(PACKET_CLIENT_ACK)
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