Page 1 of 1

Game chat log

Posted: Sun Dec 13, 2015 10:36 am
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!

Re: Game chat log

Posted: Sun Dec 13, 2015 2:03 pm
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...)

Re: Game chat log

Posted: Sun Dec 13, 2015 4:30 pm
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. :)