(svn r20974) -Add: remote console (rcon) for remote admins (dihedral)
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user