[bf1942] Anyone get RCON working?
deplinenoise at gmail.com
Thu Jun 16 13:34:59 EDT 2005
On 6/16/05, Brigham Stevens <brs at vikingmind.com> wrote:
> Thanks for the tip, that worked great!
Glad to help.
> So if we were to write our own remote rcon tool we would also have to pass
> exec before we send the command? The exec is required by the server
No, exec is itself just an rcon command which executes a console command.
IIRC, there are three rcon commands in the vanilla admin module:
'exec', 'login' and 'users'.
'login' is executed automatically from the command-line rcon client,
but in-game rcon clients
must login explicitly; using something like
> rcon login <password>
So if you add an rcon command called 'foo' it you would execute it by
just typing 'foo' followed by any arguments that command accepts.
In-game clients would use:
> rcon foo <arguments>
The admin modules works transparently with both network clients and
in-game clients, so your new commands will be available to both. The
key abstraction is a buffer which you write your output to, and the
module takes care of marshalling your output to the correct
destination, be it a socket or an in-game client.
It's worth noting that the rcon module has full access to the host
APIs, so it can do some interesting things. For instance, you could
easily add a command to kick players using a certain vehicle, or write
code to automatically temp-ban team-killers. I personally think this
is one of the more exiting features of the BF2 server and it was an
important design goal.
Also, in response to the port discussion elsewhere on this list, the
admin module binds to 0.0.0.0 by default, but that is easily changed
in the file. If you want to get fancy you can of course move that
setting to a file with some python code.
> You might not know the answer to this but will the new BF2CC app log to a
> database? It says it logs all admin commands, but does it log to a plain
> file or to a DB? I would like to keep a web log of admin kicks and bans,
> similiar to what I did with bf1942. That lets players know they were banned
> and what they need to do to become unbanned.
I'm not familiar with BF2CC at all, sorry.
printk("@#*$!!!! (%08x)\n", ...)
More information about the Bf1942