Bug - Fixed Native Mafia Chat not rainbow for Holiday Fun!

Veracity

Developer
Staff member
A DEBUG log would be essential. I suppose I'll get one of my own, by and by. I don't have the skill yet, but will soon...
 

Bale

Minion
Am I correct in my understanding that in order to have this chat effect, you need to be given the item by another player and cannot use it on yourself?
 

Lxndr

Member
Yes, you are correct. From what I am told.

(apologies for not having a debug log)
 
Last edited:

Lxndr

Member
I was told someone just used this in chat. Where would a DEBUG log have been created? Or should I have known before hand to plan?
 

lostcalpolydude

Developer
Staff member
I was told someone just used this in chat. Where would a DEBUG log have been created? Or should I have known before hand to plan?

Preferences -> Extra Debugging -> Include chat-related requests in debug log.

Before someone says it, you need to go to Help -> Start Debug Log. After they say it, Help -> Stop Debug Log.
 

Veracity

Developer
Staff member
I'll get a DEBUG log myself Monday or Tuesday. I have enough swagger to buy the item right now, but I am in Ronin. I could certainly free the king Monday, but I may choose to do some other stuff first and put it off until the next day...
 

Veracity

Developer
Staff member
Here's a colored message I got from mchat in the relay browser.

Code:
{"msgs":[{"msg":"<!--hi--><font color=\"brown\">I<\/font> <font color=\"green\">a<\/font><font color=\"green\">m<\/font> <font color=\"green\">h<\/font><font color=\"red\">a<\/font><font color=\"brown\">v<\/font><font color=\"purple\">i<\/font><font color=\"orange\">n<\/font><font color=\"brown\">g<\/font> <font color=\"orange\">s<\/font><font color=\"brown\">o<\/font> <font color=\"green\">m<\/font><font color=\"brown\">u<\/font><font color=\"purple\">c<\/font><font color=\"green\">h<\/font> <font color=\"brown\">f<\/font><font color=\"green\">u<\/font><font color=\"orange\">n<\/font><font color=\"purple\">!<\/font>","type":"public","mid":"1389915572","who":{"name":"Brianna","id":"115875","color":"black"},"format":"0","channel":"clan","channelcolor":"green","time":"1415644305"}],"last":"1389915572","delay":3000}
That message got entered in to the chat history and when I started up the chat GUI, it showed it all in rainbow colors.

Here is another message picked up by the chat GUI running the lchat protocol from that same player in chat.
Code:
<font color=green>[clan]</font> <b><a target=mainpane href="showplayer.php?who=115875"><font color=black>Brianna</font></b></a>: <!--hi--><font color="brown">h</font><font color="brown">a</font><font color="orange">p</font><font color="red">p</font><font color="purple">y</font> <font color="green">h</font><font color="orange">a</font><font color="purple">p</font><font color="red">p</font><font color="brown">y</font> <font color="orange">f</font><font color="red">u</font><font color="red">n</font> <font color="red">f</font><font color="red">u</font><font color="brown">n</font><br><!--lastseen:1389917478-->
That displayed all rainbowed in the browser, but was black in the chat GUI, as reported.
 

Lxndr

Member
I appreciate the effort on this!
Sadly, I've had issues finding people willing to help me test it.

(This is why I never got a debug log. Nobody would tell me when they were using it)
 

Veracity

Developer
Staff member
I suspect you may not see the effect if you, yourself, have it and use it in the GUI chat. I think that because I think that when you type something there, we send it along to KoL, but we do not wait for KoL to echo it back to us; we just format the message and put it in the chat GUI. That will show you your input faster, but, if KoL itself marks it up, as in this case, we'll miss the markup.

I could be wrong about how this works. I'll test, by and by, and see what happens and decide what, if anything, needs to be done.
 

Veracity

Developer
Staff member
I did test that before I submitted and marked this Fixed. ;)

The "issue", if any, will happen if you have the effect yourself and chat using the chat GUI.
 

Veracity

Developer
Staff member
I just broke this, since my fix had side effects that I couldn't see how to repair.
I'll come up with a different fix for this one. Eventually.
 

Veracity

Developer
Staff member
Interestingly enough, the V for Vivala Mask also can insert a font color which, like this effect, is suppressed. That's a lot easier to generate on demand than the Holiday Fun! effect...

Code:
<font color=green>[clan]</font> <b><a target=mainpane href="showplayer.php?who=121572"><font color=black>Veracity</font></b></a>: <!--viva--><font color=red><b>V</b></font>iva!<br><!--lastseen:1390392452-->

Note also that when I do this in the chat GUI:

Code:
http://www.kingdomofloathing.com/submitnewchat.php?pwd&playerid=121572&graf=%2Ftalkie+Viva
<font color=green>[talkie]</font> <b><a target=mainpane href="showplayer.php?who=121572"><font color=black>Veracity</font></a>:</b> <font color=red><b>V</b></font>iva<br>
I get the modified response back in the response - but without the special comment that KoL inserts if somebody else does it.
 
Last edited:

Veracity

Developer
Staff member
Revision 14952 only strips the fonts from non-"channel" messages. Events and private messages have fonts stripped as before.

I verified that my V for Vivala mask chat effect showed up correctly in the chat GUI.
And I verified that events did not seem to get regular messages attached to them and private messages looked OK.

Lets see how this one shakes out.
 
Top