Just a quick check.. would this ever not work to make sure realm name is always included?
Code:
if not name:match("%-") then
name = name.."-"..gsub(GetRealmName(), " ", "")
end
Assuming it's either the full realm name or nothing, which will be the case for any CHAT_MSG event, yes? And realm name will always be there for messages from other realms, yes?
Do realm names ever have spaces in them nowadays in API contexts? (except for
GetRealmName then)