On 6 July 2010 12:04, Matthias Pfafferodt <[email protected]> wrote: >> >> where would i put variables that need to be seen from every .c file in >> >> the server? >> > >> > The file would be ./common/fc_types.h. But you should have a good reason >> > to do something like this. >> >> a FILE structure, part of that im-notifier that i'm doing with maho >> (waiting for maho to finish his part). > > Hm, I don't know that this should be?
i thought it would be handy if you were notified about turn ends and
your enemy/ally logging in. a shy patch is attached.
Added two command line options:
-i prog, --im prog
Name of the program that will handle messages sent to it on stdin.
-n gamename, --name gamename
Gamename is the first argument to prog, it should identify the game.
Added a new procedure:
void im_freelog(FILE *pipe, const char *message, ...);
The first argument must be "im_pipe" or some other fopen file
descriptor.
The rest is printf-like.
A sample script "script.pl" is included.
Usage: civserver -i script.pl -n longturn.ex
it uses posix functionality so i guess it's unacceptable for freeciv.
--
Michal Mazurek
http://dude.bshellz.net
im.patch
Description: Binary data
cat.pl
Description: Binary data
irc.pl
Description: Binary data
script.pl
Description: Binary data
_______________________________________________ Freeciv-dev mailing list [email protected] https://mail.gna.org/listinfo/freeciv-dev
