Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2002:
[Freeciv-Dev] Logport
Home

[Freeciv-Dev] Logport

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Logport
From: Veli Mankinen <veli@xxxxxxxxxxx>
Date: Fri, 11 Oct 2002 16:45:55 +0300

Hi all,


PROBLEM:

I just started to play freeciv with my friends and we decided to use
12h turns. This means that all the players will disconnect from the game
after each turn and then wait for his/hers next turn. 

The problem with this is that it could be that the turn changes after 10
minutes or 10 hours after the player disconnected and freeciv does not
seem to have a way to inform the outside world about this. The only way
to know if the turn has changed and to get information about who has not
yet done his turn seems to be that one connects to server with a client
and gets the turn-blocking mode lines.

I think the game could go on more fluently if one could see this
information from somewhere outside the game.


SOLUTION:

I made a patch that implements a "logport" to the civserver. If you
start the patched version of civserver with option -L <port> it starts
to listen for "log connections" to that port. One can use for example
telnet to that port and get all the loglines that normally go to the
logfile or to the console.

The logport can also be used for asking information from the server.
This version implements actually only the "list" command and even that
is not completely ready, but I think it would be great to get the "show"
command to work too.


SO WHAT IS THIS REALLY FOR?:

I have made a small script to my ircbot that connects to this logport,
asks for the players at the server and waits for the turn to end. After
that it sets the topic of the channel so that one can see the usernames
of the players that have not yet made their turn. Everytime someone
presses the turn done button the bot gets a logline of that event and
sets the topic again. This way our game continues a lot more fluently.


----

I'll include the patch in this mail. Tell me what do you think. Is this
worth adding to freeciv or have I just lost it totally or haven't I just
undestood something and done all this for nothing? (Anyway it works for
us :). The implementation is not really a best possible because I wanted
to make it quickly so that I can try it...

    - Veli

    




Attachment: freeciv_logport.patch
Description: Text document


[Prev in Thread] Current Thread [Next in Thread]