[bf1942] ConsoleSendCommand event

Markus Thurlin thurlin at algonet.se
Sun Jun 26 19:29:20 EDT 2005

Go to: serverdir\Admin\default.py
Find the row: "# rcon commands supported in this vanilla version" and edit
the array beneath to incorporate a new function of your choice.
Find the row:  "# Command implementations go here (member functions of the
AdminServer)" and add you function below (just look at the functions given
there for a clue about parameters etc).

Hope it works :)


----- Original Message ----- 
From: "Paul Bowsher" <paul.bowsher at gmail.com>
To: <bf1942 at icculus.org>
Sent: Monday, June 27, 2005 12:49 AM
Subject: Re: [bf1942] ConsoleSendCommand event

Basically, we want to be able to do, for example,
rcon exec admin.myNewCommand

and attach that to a function (yeah, we know we'd need to do summat
like if command == 'myNewCommand': blah)

Any clues?

On 6/26/05, "Einar S. Idsø" <esi at itk.ntnu.no> wrote:
> Sure, this is quite easy actually. Like I mentioned in the "We really
> need the Python API"-thread, we have made this work. Until we release
> our code (Panic is still cleaning it up a bit, I think), take a look at
> the tk_punish.py script under standard_admin. It shows how
> callback-functions can be registered with events.
> Or am I missing something here, and what you're asking is something more
> complex than that?
> Einar
> > Agreed; but there also seems to be another issue, though: I have yet to
> > hear of anybody getting *any* events registered for with
> > host.registerHandler to receive callbacks.  There's some trick we're
> > missing. . .
> >
> > Anybody figure it out, yet?
> >
> > --Forrest
> >
> >

Paul Bowsher
IT Systems Developer
Simply Stuck Ltd

More information about the Bf1942 mailing list