Message Logs

Need help seting up a server, or have a question on how to run one? This is the place.
Post Reply
happyhad
Private First Class
Private First Class
Posts: 18
Joined: Wed Oct 21, 2015 7:58 pm

Message Logs

Post by happyhad » Wed Oct 21, 2015 8:20 pm

We have started a lunch time BZFlag server here at work. Pretty new to all this.

I was thinking of organizing a lunch work league. I would like to be able to capture some logs.
I am able to redirect to a log and get the score by the server. I also have the plugin for logDetail activated. All this is on Windows. This is working fine.

I was hoping to be able to get the message log. My plan was to write a program to process the message log file. From that information I could determine a lot of stats. Who killed themselves the most, Who killed teammates the most, who ran the flag the most, who each player killed the most etc. All this could be compiled and we could do awards at the end of the season :D. I can run the /savemsgs command, but unfortunately there seems to be limit to the number of lines it saves out. Is there a way around this?

Also I noticed that if you hit the home button you get stats on how many shots you fired and what your hit rate was. So with the same theme as above, who used most ammo, who was the most accurate etc. I can just screen shot and record the info, but was hoping there was a more elegant solutions?

Thanks

User avatar
blast
General
General
Posts: 4776
Joined: Fri Mar 21, 2003 3:49 pm
Location: playing.cxx
Contact:

Re: Message Logs

Post by blast » Thu Oct 22, 2015 10:15 am

There is an -echo option that, on Windows, tries to write a stdout.txt file with anything that hits the message box at the bottom. However, I think it tries to write this to the same location as the bzflag.exe file, which on anything newer than XP isn't writable by software that isn't running UAC elevated, so it's kinda useless. I should probably look into fixing that for our upcoming 2.4.4 release.

If you're somewhat familiar with C++, you could write a server plugin that would dump all that information out as text (much like logDetail) or even throw it into a database like SQLite.
"In addition to knowing the secrets of the Universe, I can assure you that I am also quite potty trained." -Koenma (Yu Yu Hakusho)

Image

happyhad
Private First Class
Private First Class
Posts: 18
Joined: Wed Oct 21, 2015 7:58 pm

Re: Message Logs

Post by happyhad » Thu Oct 22, 2015 12:48 pm

Thank you for the info.

I will see what I can do with -echo. I can change the UAC so that might work.

I also thought about using the cron plug in and have that run /time and then /savemsg every minute. Since it keeps appending the same file, I would have overlapping log entries. But I could programmatically eliminate the duplicate entries.

I need to get familiar with C++. I am a VB.NET hack. Writing plugins sound like fun, but a little daunting at this point.

Thanks for the response!

User avatar
blast
General
General
Posts: 4776
Joined: Fri Mar 21, 2003 3:49 pm
Location: playing.cxx
Contact:

Re: Message Logs

Post by blast » Thu Oct 22, 2015 5:42 pm

The /savemsg command is a client-side command that dumps the contents of the chat panel buffer to a file, so server plugins will not work with it.
"In addition to knowing the secrets of the Universe, I can assure you that I am also quite potty trained." -Koenma (Yu Yu Hakusho)

Image

Post Reply