Page 1 of 1

Problem with Chat History plugin

Posted: Fri Apr 27, 2012 1:50 pm
by zel
I'm using the Chat History plugin that ships with BZFS, but unfortunately chat is not being logged. I don't see any command line options that need to be set nor any instructions included with the plugin. Any ideas as to why chat is not being recorded? Might it be a permissions/ownership issue with my file system? Is chat log stored to file, or in memory, or... ? The plugin loads without errors, but when I issue a command using /last <num> <player> it returns "[SERVER->] That player has no chat history." no matter which player or whether they've sent any messages.

Thoughts? Thanks in advance.

Running BZFS 2.4.0.20120405 on latest Ubuntu distro.

Re: Problem with Chat History plugin

Posted: Sat Apr 28, 2012 5:29 pm
by strayer
Did you set a number of maximum allowed chat lines to store?

Code: Select all

bzfs -loadplugin chathistory,1000
I don't know who last had his/her fingers on that plug-in but it is full of problems (okay, only two as far as I know ^^).
1) If you don't set the number of maximum chat lines it's set to "0". The line to preset the value to 1000 is useless and has no effect. So whenever a chat message has been added, an erase() is called immediately afterwards. ;)
2) Even if you set the a maximum chat line number you will surely get into trouble when using the "/last" command because the faulty pointer magic causes a segmentation fault on access.

You are very welcome to fix that bug and make the plug-in work or you can open a new bug report at SourceForge.net (http://sourceforge.net/tracker/?atid=10 ... unc=browse) !

[EDIT]
I forgot to answer all your questions:
a) The chat history is stored in memory.
b) You have to specify the number of history elements per player as seen in point (1).
c) You shouldn't use the chathistory plug-in in production since it doesn't delete any history elements of players that left the server - even when it is very long ago. (That would be useful because it matches against the callsign only and doesn't take probably available bzIDs into account.) So after a long run you could have your server's memory filled with old messages. Furthermore, there is the bug explained in point (2).
[/EDIT]

Re: Problem with Chat History plugin

Posted: Tue May 01, 2012 1:57 am
by zel
Wanted to say THANKS for the reply, I did make the change and see the segmentation fault. Need to dust off my cpp books, but I will take a look and report any findings here.