summaryrefslogtreecommitdiff
path: root/src/console.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-10-17 17:41:52 +0000
committerrubidium <rubidium@openttd.org>2010-10-17 17:41:52 +0000
commitad12a91cdae152aff87404dce7718706b91d5cb4 (patch)
tree8a6658076b75e1dbe9d0dbe207e9fdc7c65363e2 /src/console.cpp
parentd9602f4ef936b79c1d1ee785477323618e46f9cf (diff)
downloadopenttd-ad12a91cdae152aff87404dce7718706b91d5cb4.tar.xz
(svn r20974) -Add: remote console (rcon) for remote admins (dihedral)
Diffstat (limited to 'src/console.cpp')
-rw-r--r--src/console.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/console.cpp b/src/console.cpp
index ab131b135..c7a1ffd74 100644
--- a/src/console.cpp
+++ b/src/console.cpp
@@ -13,6 +13,7 @@
#include "console_internal.h"
#include "network/network.h"
#include "network/network_func.h"
+#include "network/network_admin.h"
#include "debug.h"
#include "console_func.h"
#include "settings_type.h"
@@ -38,6 +39,7 @@ void IConsoleInit()
_iconsole_output_file = NULL;
#ifdef ENABLE_NETWORK /* Initialize network only variables */
_redirect_console_to_client = INVALID_CLIENT_ID;
+ _redirect_console_to_admin = INVALID_ADMIN_ID;
#endif
IConsoleGUIInit();
@@ -96,6 +98,11 @@ void IConsolePrint(ConsoleColour colour_code, const char *string)
NetworkServerSendRcon(_redirect_console_to_client, colour_code, string);
return;
}
+
+ if (_redirect_console_to_admin != INVALID_ADMIN_ID) {
+ NetworkServerSendAdminRcon(_redirect_console_to_admin, colour_code, string);
+ return;
+ }
#endif
/* Create a copy of the string, strip if of colours and invalid