Problem with Chat History plugin

Need help seting up a server, or have a question on how to run one? This is the place.
Post Reply
zel
Private First Class
Private First Class
Posts: 13
Joined: Mon Apr 02, 2012 11:03 pm

Problem with Chat History plugin

Post by zel » Fri Apr 27, 2012 1:50 pm

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.

User avatar
strayer
Sergeant Major
Sergeant Major
Posts: 191
Joined: Sat May 24, 2003 3:54 pm
Location: Germany
Contact:

Re: Problem with Chat History plugin

Post by strayer » Sat Apr 28, 2012 5:29 pm

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]
A pessimist is an optimist with experience... ;o)

zel
Private First Class
Private First Class
Posts: 13
Joined: Mon Apr 02, 2012 11:03 pm

Re: Problem with Chat History plugin

Post by zel » Tue May 01, 2012 1:57 am

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.

Post Reply