Game chat log

You can get help here if Freeciv doesn't start on your computer, or if you keep getting fatal errors while playing etc.
Post Reply
SleepyOne
Posts: 2
Joined: Sun Dec 13, 2015 10:31 am

Game chat log

Post by SleepyOne »

Hi Guys,

i can't figure out, how could i save the chat log from the server. Is there any way to achieve this? I created a small code which sends email alert about the next turn to the players and i'd like to attach the chat messages as well.

Thanks in advance!
User avatar
JTN
Elite
Posts: 473
Joined: Wed Jan 30, 2013 12:15 am

Re: Game chat log

Post by JTN »

There's no ability for the server to save a simple logfile of chat messages.

You could enable the event cache (see server settings ec_turns, ec_chat etc) and scrape chat messages out of a savegame (either the automatic turn-change one, if you've enabled it, or a script-triggered one).

This is an internal format, so undocumented and subject to change between major versions, but should be fairly stable.) Search for [event_cache].

(Watch out for information leaks between players...)
SleepyOne
Posts: 2
Joined: Sun Dec 13, 2015 10:31 am

Re: Game chat log

Post by SleepyOne »

Thanks, i've found it!

Now i can write a small parser which extracts the public chat messages and attach it to the email. :)
Post Reply