View Single Post
04-21-12, 10:57 AM   #1
Billtopia
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Apr 2009
Posts: 110
Real ID "k" string to text

while trying to mod one of my addons I have run into a problem... WoW events such as "CHAT_MSG_BN_WHISPER" return as arg[2] a K string instead of the person's real name...
like my gf's name was returned as |Kf15|k00000000000000|k that is useless to me(and the rest of the world) I read up on what it means but have no idea how to turn it into her actual name. I have printed the string and the name shows but I have no way of doing any pattern matching... string manipulation on the string as it is not a name but a "K" string and a waste



|K[gsf][0-9]+|k[0]+|k
New in 4.0 - Represents a Battle.net friend's name. The 3rd character indicates given name, surname, or full name. The number which follows it represents the friend's Bnet Presence ID. The zeros between the |k form a string of the same length as the name which will replace it. E.g. if your first name is John and your presence id is 30, your given name (John) would be represented by the string |Kg30|k0000|k .
  Reply With Quote