Run exec commands on dedicated server?

I soon plan to support dedicated servers for my game. One thing I’m curious about is how I can run exec commands while the game is running. For things like kicking players etc.

When running a game .exe as follows:



UDK.exe server someMapName


It runs the server and shows logs in an cmd window. But how do i actually input commands?

I think you can start a server, and add this to the command line: ?AdminPassword=<password>

And then during the game someone who is logged in can run the exec command AdminLogin <password> and after after that can run admin commands.

I don’t know of any way to kick a player from the command line.

Kick( string S )type in FunctionName(playersname) hit enter should kick the player as long as you are logged in as admin.

KickBan( string S )type in FunctionName(playersname) hit enter should kickban the player as long as you are logged in as admin.

RestartMap() should restart the map.
PlayerList() Should get you all players on server in a list.

Switch( string URL ) put in new url and it will switch to those setting in new url.

@gamepainters Those commands are if you are within the game. I’m talking about when you are running a dedicated server (no not in the game).

I think the only way is to login to the game as an admin from another instance, and then run the commands from in game (as @Nathaniel3W mentioned).

Thanks for the info guys.

Yes you must login as admin 1st then you can run the commands as a client on the dedicated server.

if your a client joining a server that your an admin on and using a commandline to join.
open 192.168.10.101?Password=Whatever-admin-pass-is

in your login() in gameinfo file. Our line is this.

InPassword = ParseOption ( Options, “Password” );//admin pass

So we use password as the admin pass

// perform auto-login if admin password/name was passed on the url
if( AccessControl != None && AccessControl.AdminLogin(NewPlayer, InPassword) )
{
AccessControl.AdminEntered(NewPlayer);
}

Those commands in the above reply are from the admin class file. If your not logged in as admin you can not run them.