New Content - Implemented KoLmafia doesn't fully support KoL's built-in tabbed chat

Bale

Minion
I take it the two sets of messages are disjoint, though?

PMs are disjoint.

For channel chat, I have no problem, but it is worth noting that I set options to only show PMs in separate tabs. All channels are mixed together which is probably why they aren't having a problem. Maybe. I haven't been trying hard to figure out the issue.
 

Grotfang

Developer
The stranger part of this is that, without looking at the existing chat code, it seems like mafia GUI integration and relay browser handling are using completely unconnected code

If I remember correctly, this is correct. It was one of the frustrations I had when trying to write this patch first time round, as I couldn't readily see how to fix this. I believe my solution at the time was to start the chat poller when the relay browser chat was opened, or when GUI chat was opened (whichever came first) and display to either or both as required (basically, the ajax request from the browser never went to KoL, since the poller would get the info anyways).
 

heeheehee

Developer
Staff member
PMs are disjoint.

For channel chat, I have no problem, but it is worth noting that I set options to only show PMs in separate tabs. All channels are mixed together which is probably why they aren't having a problem. Maybe. I haven't been trying hard to figure out the issue.

Hmm, odd. I'm experiencing the following: anything seen by the relay browser makes its way to Mafia chat, but anything seen by the ChatPoller doesn't make it to the relay browser. This sometimes has the consequence of duplicating messages (which I'm pretty sure I can fix).

I'm not sure how the dual-chat system worked before; I'll look into it some more.

edit: Oh, I see. Sending a PM via tabbed chat adds it to your chatpane, whereas via older chat, you had to poll the server, and it would tell you "oh hey, you sent this message earlier". I'll roll out another patch once I figure out how to deal with /who and friends.
 
Last edited:

Bale

Minion
Whee! Awesome!

Also, check out the "/listen" command. It seems to only send the result to my events tab, quite unlike other chat commands. Although, you might have fixed that along with everything else. This is just a note that this was broken differently from other things that were broken before you started to fix them.
 

heeheehee

Developer
Staff member
Haven't gotten around to handling "events" yet, but yeah, I've seen that (also, clan member login notifications etc).
 

heeheehee

Developer
Staff member
Attached you'll find my current working copy. There's still some weirdness with commands in general which mchat.php automatically prefixes with /currentchannel (i.e. they don't work; you'll need to change your current tab to [events]), but other than that, I think I've covered most of the bases.
 

Attachments

  • mchat.patch
    18.2 KB · Views: 33

lostcalpolydude

Developer
Staff member
I'm finally getting around to looking at the latest version of the patch. For some reason ChatPoller had a lot of whitespace changes. I've actually switched KoL settings to use modern chat, so I'll see what this patch does.
 

lostcalpolydude

Developer
Staff member
I've spent zero time looking at the cause of this, and I'm about to go to sleep, but being in chat when rollover hits (at least in the relay browser, mafia's chat was not open) leads to this debug log every few seconds:
Code:
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
             KoLmafia v16.0, Windows 7, Java 1.7.0_21
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Please note: do not post this log in the KoLmafia thread. If you
 would like the dev team to look at it, please write a bug report
 at kolmafia.us. Include specific information about what you were 
 doing when you made this and include the log as an attachment.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Timestamp: Mon Aug 19 22:30:00 CDT 2013
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Unexpected error, debug log printed.
class java.lang.NullPointerException: null
java.lang.NullPointerException
	at net.sourceforge.kolmafia.request.RelayRequest.handleChat(RelayRequest.java:1851)
	at net.sourceforge.kolmafia.request.RelayRequest.run(RelayRequest.java:1947)
	at net.sourceforge.kolmafia.RequestThread.postRequest(RequestThread.java:222)
	at net.sourceforge.kolmafia.RequestThread.postRequest(RequestThread.java:185)
	at net.sourceforge.kolmafia.webui.RelayAgent.readServerResponse(RelayAgent.java:526)
	at net.sourceforge.kolmafia.webui.RelayAgent.performRelay(RelayAgent.java:158)
	at net.sourceforge.kolmafia.webui.RelayAgent.run(RelayAgent.java:131)
 

heeheehee

Developer
Staff member
Yeah, I think I worked around that at some point.

Last I checked it would also generate debug logs for System Messages (notably "maintenance in X minutes"), since for whatever reason, recipient and channel are both null. I'm not sure why currentChannel is never being set; I'll have to look into that at some point.
 

heeheehee

Developer
Staff member
I think this patch covers my current working copy. I haven't gotten a debug log in a while, but I also haven't played much lately. Also adds support for /cli commands (basically the only feature I ever wanted), although it's probably a bit wonky at first..
 

Attachments

  • mchat.patch
    21.6 KB · Views: 29

Veracity

Developer
Staff member
Any dev working on this?

I'd like to spin a new release after we support the Oct IOTM and this would sure be nice to get in...
 

Bale

Minion
It'd be nice to spin a new one. The last point release doesn't support SVN or correct KoL location names. Huge differences since the last.
 

Veracity

Developer
Staff member
I'm planning on doing it. Supporting the new native tabbed chat in the new release would be the icing on the icing, in my opinion.

So, I repeat: any dev want to take this up? I've been working my butt off on "performance" issues and other things that affect me directly (unlike KoL's tabbed chat, since I use ActiveChat), so it will not be me. Anyone else?
 

lostcalpolydude

Developer
Staff member
Heeheehee's patch looks pretty good, especially now that it's almost rollover and I see that System Messages show up properly (I only switched from an older patch earlier today). I'm planning to commit it tomorrow, after spending a little bit of time seeing if I can find anything meaningfully broken with mafia's GUI (I don't expect to find anything there though).
 

Bale

Minion
With both mafia's chat and the relay browser chat open at the same time all the messages went to both places, just as they should. Thanks, hee[SUP]3[/SUP]!

Now for the problems...
  1. I have chatBeep = true. I like getting a beep whenever someone sends me a PM in chat. It didn't beep when I got PMs.
    Should I open a bug report?
  2. When I sent a request to faxbot, mafia chat showed the PM I sent to faxbot and then faxbot's response. By contrast, the relay browser only showed faxbot's response, without having shown my previous outgoing message.
    Bug report?
 

lostcalpolydude

Developer
Staff member
chatBeep works in 12761. No messages sent from mafia's GUI, whether typed in or using faxbot or whatever, show up in the relay browser; I probably won't be the one to fix that minor issue.
 

heeheehee

Developer
Staff member
I don't know how to fix that one, since KoL responds to outgoing messages with the update for chat, as opposed to bundling them with the rest of incoming messages (which I imagine happened before).
 

xKiv

Active member
I got a whole bunch of /who results in *each* mafia-chat tab.
6 channels got /who from valhalla, radio, veteran an trade
5 got /who from only veteran and trade.
(Yes, that means 7 channels didn't get their own /who result at all - clan, radio, pvp, kwe, arcade, dread)

I also get a *lot* of "You are now in away mode, chat will update more slowly until you say something." in the CLI. Like 11 at a time (i.e. one for each channel open, including events, but excluding PMs). And I think it happens for each channel separately, as if each channel has its own awaymode timer.
No, wait. Now I have 15, kol's event tab shows them like this:
Code:
[21:01] You are now in away mode, chat will update more slowly until you say something.
[21:01] You are now in away mode, chat will update more slowly until you say something.
[21:01] You are now in away mode, chat will update more slowly until you say something.
[21:02] You are now in away mode, chat will update more slowly until you say something.
[21:03] You are now in away mode, chat will update more slowly until you say something.
[21:03] You are now in away mode, chat will update more slowly until you say something.
[21:04] You are now in away mode, chat will update more slowly until you say something.
[21:04] You are now in away mode, chat will update more slowly until you say something.
[21:04] You are now in away mode, chat will update more slowly until you say something.
[21:05] You are now in away mode, chat will update more slowly until you say something.
[21:05] You are now in away mode, chat will update more slowly until you say something.
[21:06] You are now in away mode, chat will update more slowly until you say something.
[21:06] You are now in away mode, chat will update more slowly until you say something.
[21:07] You are now in away mode, chat will update more slowly until you say something.
[21:07] You are now in away mode, chat will update more slowly until you say something.
(plus one more while I was copypasting this)


ETA: the /who thing is new, the awaymode thing is old but might have been affected by the patch too - I don't think I got *that* many of them before.

ETA2: also, I have a tab with outgoing PMs to antic_the_fearless , and a tab with incoming PMs from antic the fearless; note the underscores and missing underscores - separate bug report?
 
Last edited:
Top