Bug - Fixed Unrecorded PM responses in mafia chat

Grotfang

Developer
I have a screenshot, but it needs explaining.

I send GsL a PM via the mafia interface (with KoL chat open too, but I have tested to ensure the effect is the same with no KoL relay running) saying meat total. I see the response in KoL, but not in mafia. When I don't have the relay open, I simply see no response.

I then send him a message via the relay browser (date). This is recorded in mafia chat, but the response (while received) is not. This is using an unmodified version of 8576.

Not sure if I'm doing something wrong here, or if this occurring for more than just me. Cheers!
 

Grotfang

Developer
Wanted to update with the results of my testing. I've narrowed down the issue to be one of chatbot script handling. The presence of a chatbot script is stopping incoming private messages from appearing in KoLmafia Chat. Outgoing is printed correctly regardless. Is there a reason for this, or is it ok for me to try and fix?

EDIT: Had a quick look through:

Line 250 of ChatManager.java causes a return from processMessage() if processCommand() returns true. processCommand() will return true for buffbots, update commands and chatbots. Would it be so bad simply to eliminate that return at line 254 to allow these to appear in the chat for those who keep them running in the background? I guess I'm asking if there is any harm in them returning, but the return being irrelevant (or always false).

DOUBLE EDIT: Patch-tastic. This works for me to solve the problem, but I would appreciate criticism/questions/explanation of anything I've broken or made worse here (although I hope it is good). Cheers!
 

Attachments

  • ChatManagerPMs.diff
    2.5 KB · Views: 41
Last edited:
Top