Quantcast Changes to how guild messages are handled in chat - WoWInterface
Thread Tools Display Modes
12-11-18, 11:18 PM   #1
Terenna
A Black Drake
AddOn Author - Click to view addons
Join Date: Jun 2016
Posts: 80
Changes to how guild messages are handled in chat

Good evening all,

With 8.1 I noticed something strange about the messages from CHAT_MSG_GUILD event. Specifically, argument 1 is displaying something different from what is being put into the final chat. That is, there's some function that I can't identify in the blizzard code that is wrapping guild messages.

To explain this better, I gsub'd the arg1 of guild messages to look for '|' and replace it with '||' thereby breaking hyperlinks to see what they look like. If I typed something like 'test' without the quotes into guild chat, arg1 would show up as 'test' without the quotes, but my gsub'd message would show up as |Kv26|k. the integer after v increased by one as more and more chat messages entered guild chat. This is unique to guild messages, I do not belong to any communities in game, but I suspect this may be occurring there, too. I tried searching the blizzard code on townlong yak, but the only thing I could find was https://www.townlong-yak.com/framexm...Frame.lua#3098 which runs the chat through a function called 'Ambiguate' but I couldn't locate this function on the website.

If anyone has any idea what's going on, I'd greatly appreciate it.

TL;DR 8.1 is creating |K|k wrapped messages for guild chat and I don't know which function is doing it. This was not occurring in 8.0.

Last edited by Terenna : 12-12-18 at 01:29 AM.
  Reply With Quote
12-12-18, 01:09 AM   #2
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,048
From the 8.1 documentation about the event

Code:
CHAT_MSG_GUILD
PAYLOAD:
	text, Type = string, Nilable = false
	playerName, Type = string, Nilable = false
	languageName, Type = string, Nilable = false
	channelName, Type = string, Nilable = false
	playerName2, Type = string, Nilable = false
	specialFlags, Type = string, Nilable = false
	zoneChannelID, Type = number, Nilable = false
	channelIndex, Type = number, Nilable = false
	channelBaseName, Type = string, Nilable = false
	unused, Type = number, Nilable = false
	lineID, Type = number, Nilable = false
	guid, Type = string, Nilable = false
	bnSenderID, Type = number, Nilable = false
	isMobile, Type = bool, Nilable = false
	isSubtitle, Type = bool, Nilable = false
	hideSenderInLetterbox, Type = bool, Nilable = false
	supressRaidIcons, Type = bool, Nilable = false
arg1 would be the text, arg2 the player name. Mind you, it doesn't appear to have changed from 8.0.1.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.

Last edited by Fizzlemizz : 12-12-18 at 01:14 AM.
  Reply With Quote
12-12-18, 01:29 AM   #3
Terenna
A Black Drake
AddOn Author - Click to view addons
Join Date: Jun 2016
Posts: 80
I'm so sorry, you are correct, I mistyped argument 2 twice (late night :/) but arg1 is displaying one thing, and yet there seems to be some sort of hyperlinked message going into the actual displayed chat window. I'm unsure what to make of it.
  Reply With Quote
12-12-18, 05:10 AM   #4
Kanegasi
A Rage Talon Dragon Guard
 
Kanegasi's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2007
Posts: 320
I noticed the same problem. I have an addon called TrueChatFrameHistory that saves and restores chatframes across reloads, logouts, and exits directly through the actual chat elements. With this change, if I exit the game, my guild chat is a giant scrolling list of “Unknown” because this escape sequence is pulling data from the communities stream that resets upon logout/exit.

This |Kv#|k is, in my opinion, abusing the obfuscation element of bnet names to tunnel stream chat from communities into the chatframe. This Kk escape sequence used to only be used to display bnet names in such a way that addons can’t see the name, only the escape sequence.

What’s even more frustrating is that whatever code that does this happens after the CHAT_MSG_GUILD event, so when I try to force arg1 into the most recent element, it’s replaced. Even weirder is that one time during testing, the previous element was replaced, then the new chat element appeared, both having the same text, and both with the Kk escape sequence. I really hope whatever shit they have doing this isn’t a watchdog that will keep replacing the element text.

I’ve decided to give up on injecting plain text into the historyBuffer and am working on just dumping the communities guild stream directly into the chatframe so I don’t have to worry about my history addon having bad data.

Edit: it just occurred to me that OP said the actual arg1 is the Kk sequence. I completely missed that during my tinkering last night. In etrace, the text showed up, in all my temporary hooks along the path text takes between the event and chatframe display, the text showed up. Looks like every single position formatted the sequence and that’s why the weird replacement happened above. I don’t think guild messages show up anywhere now.

Edit2: Anyone can "test" this out by logging into a character in a guild, say something in gchat or wait for someone to do so, then doing the following to print exactly what that first message said:

/run print("\124Kv1\124k")

Last edited by Kanegasi : 12-12-18 at 04:23 PM.
  Reply With Quote
12-12-18, 04:30 PM   #5
Kanegasi
A Rage Talon Dragon Guard
 
Kanegasi's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2007
Posts: 320
I'm posting again because I discovered another side effect of this change.

I keep chat logs. A lot of them. I have a rolling archive that goes back about two years. This communities guild stream change no longer logs guild chat to WoWChatLog. I looked at my log files for yesterday, every single guild line has a character name but no message. It's as if everyone in guild chat said nothing.
  Reply With Quote
12-12-18, 04:48 PM   #6
Terenna
A Black Drake
AddOn Author - Click to view addons
Join Date: Jun 2016
Posts: 80
Originally Posted by Kanegasi View Post
It's as if everyone in guild chat said nothing.
https://inception.davepedu.com/
  Reply With Quote
12-12-18, 06:20 PM   #7
Kanegasi
A Rage Talon Dragon Guard
 
Kanegasi's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2007
Posts: 320
This is deeper. Because guild was "community"-ized, it was affected by an RP addon block:

https://www.reddit.com/r/wow/comment..._get_it_fixed/
https://us.forums.blizzard.com/en/wo...roleplay/45663

TL;DR an RP addon was using communities to chat cross-faction, causing Blizzard to lock down communities from addons, which explains the use of the |Kv#|k obfuscation.

Also, I missed the mention of "Ambiguate" in OP. That function has been around for a few years and has nothing to do with message content. It simply formats a character's name in an attempt to standardize "name" and "name-realm" display across the UI. It is not defined in public code. I've tried using it before, it's not very reliable.
  Reply With Quote
12-12-18, 07:42 PM   #8
Terenna
A Black Drake
AddOn Author - Click to view addons
Join Date: Jun 2016
Posts: 80
This issue doesn't really impact me that severely. it just changes the text color of any message in guild chat that follows a hyperlink. it doesn't lose the text in my addon, just turns it white, but only after a hyperlink. Still mad annoying that they would do this without mentioning it.
  Reply With Quote
12-13-18, 05:06 AM   #9
Armak
A Defias Bandit
Join Date: Dec 2018
Posts: 3
Did anyone find something out?
I have a WeakAura that reacts to certain kind of chat commands and since yesterday I cannot react to commands posted in the guild chat any more.

Things I've tried:
  • Get the 'real' chat value with loadstring() and asset()
  • Produce an error message, read it into a variable and filter out the string using pcall()

Both did not work. The substitution seems to be made at a level we cannot interact with at all. It seems there is no possibility to resolve the |Kv#|k notation into their counterpart. Any other ideas to try?

Something I'm going to try later:
It might work using the addon channel or something similar which implies sending the |Kv#|k string to other players, since the value is player dependant and has to be resolved at this time. But it could be that you keep seeing the masked value and the other player would have to resend it to you to finally get it in clear text...

|Ev1|e:
Putting it into a EditBox results in an empty string. GetText() afterwards also.

Last edited by Armak : 12-13-18 at 05:32 AM.
  Reply With Quote
12-14-18, 12:37 AM   #10
Ashayo
A Kobold Labourer
Join Date: Dec 2018
Posts: 1
This broke Greenwall, which is an add-on used to transparently merge guild chat for multiple (same faction) guilds. While it has now been patched, a temporary extra addon was created which makes it a lot more clear as to how to work around the issue. See the code here: https://wow.curseforge.com/projects/gw-patch
  Reply With Quote
12-14-18, 01:08 AM   #11
Terenna
A Black Drake
AddOn Author - Click to view addons
Join Date: Jun 2016
Posts: 80
I think there's too many AddOn casualities that did nothing wrong for this change to stay as it is. They'll probably revert it and/or come up with a more readily hookable/readable solution. Hopefully it gets answered during tomorrow's Q/A.
  Reply With Quote
12-14-18, 01:47 AM   #12
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,048
I love your optimism.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
  Reply With Quote
12-14-18, 03:38 AM   #13
Armak
A Defias Bandit
Join Date: Dec 2018
Posts: 3
Originally Posted by Ashayo View Post
This broke Greenwall, which is an add-on used to transparently merge guild chat for multiple (same faction) guilds. While it has now been patched, a temporary extra addon was created which makes it a lot more clear as to how to work around the issue. See the code here: https://wow.curseforge.com/projects/gw-patch
Thanks, as I supposed. Unfortunately, this is not a solution to everything, as you still cannot read the guild chat, only what you wrote yourself.
All in all, this masking looks like a hacky workaround which hopefully gets reverted.
It looks like it has been a lot of work, though, and must have some kind of weakness somewhere. Stuff like this is prone to mistakes :-)
  Reply With Quote
12-14-18, 01:10 PM   #14
Terenna
A Black Drake
AddOn Author - Click to view addons
Join Date: Jun 2016
Posts: 80
Well. At least they mentioned it.

Really wish they'd add a separate event for CHAT_MSG_GUILD and CHAT_MSG_COMMUNITY or something. Let the community tab be subject to the increased scrutiny.

Last edited by Terenna : 12-14-18 at 01:13 PM.
  Reply With Quote
12-14-18, 05:33 PM   #15
Armak
A Defias Bandit
Join Date: Dec 2018
Posts: 3
Now they added an item which allows you to understand the opposite faction for an hour.
Me no understand.

Last edited by Armak : 12-14-18 at 05:40 PM.
  Reply With Quote
12-14-18, 09:46 PM   #16
JDoubleU00
An Onyxian Warder
 
JDoubleU00's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 390
Originally Posted by Armak View Post
Now they added an item which allows you to understand the opposite faction for an hour.
Me no understand.
What? No..
__________________
Author of JWExpBar and JWRepBar.
  Reply With Quote
12-31-18, 12:29 PM   #17
Kanegasi
A Rage Talon Dragon Guard
 
Kanegasi's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2007
Posts: 320
Sometime between December 18th and December 24th, guild was hotfixed to be excluded from the communities obfuscation. Addons and WoWChatLog can see guild chat once more.
  Reply With Quote
01-04-19, 05:10 PM   #18
Terenna
A Black Drake
AddOn Author - Click to view addons
Join Date: Jun 2016
Posts: 80
This is fantastic. Thank you!
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » Changes to how guild messages are handled in chat

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off