Thread Tools Display Modes
03-24-12, 02:10 AM   #1
Worcester
A Deviate Faerie Dragon
 
Worcester's Avatar
Join Date: Apr 2008
Posts: 13
Chat--Hide Realm Name

This is likely contained in another addon or maybe even a setting I can't seem to find. I do run Prat right now, btw, but I don't see this anywhere...

I don't want to see somebody's realm name in chat when I'm doing a random dungeon or raid. About the only time I care about realms is with Real ID chats, but having to see that someone is from Rivendare or Coilfang over and over in chat gets annoying and takes up useless space. Any thoughts about how to get rid of the names?

Thanks so much!
__________________
I prefer rogues to imbeciles, because they sometimes take a rest.
--Alexandre Dumas
  Reply With Quote
03-24-12, 04:44 PM   #2
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,060
This is certainly doable. If you can't find something that does this I'll throw one together.
  Reply With Quote
03-24-12, 07:40 PM   #3
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Lua Code:
  1. local hooks = {}
  2. local function AddMessage(frame, message, ...)
  3.     local info, name = message:match('|Hplayer(.-)|h%[(.-)%]|h')
  4.     if(info) then
  5.         message = message:gsub('|Hplayer:(.-)|h%[(.-)%]|h', string.format('|Hplayer:%s|h[%s]|h', info, name:gsub('%-[^|]+', '')))
  6.     end
  7.  
  8.     return hooks[frame](frame, message, ...)
  9. end
  10.  
  11. for index = 1, NUM_CHAT_WINDOWS do
  12.     local frame = _G['ChatFrame' .. index]
  13.     hooks[frame] = frame.AddMessage
  14.     frame.AddMessage = AddMessage
  15. end
  Reply With Quote
03-25-12, 02:39 PM   #4
Worcester
A Deviate Faerie Dragon
 
Worcester's Avatar
Join Date: Apr 2008
Posts: 13
Thanks very much for the help. This is a silly question, maybe, but where exactly should I add that Lua code? In Prat or someplace else? Sorry for my ignorance of such things.

Thanks again!
__________________
I prefer rogues to imbeciles, because they sometimes take a rest.
--Alexandre Dumas
  Reply With Quote
03-25-12, 03:14 PM   #5
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
You can add it to a new addon if you want to, it doesnt have any depencies at all.
  Reply With Quote
03-25-12, 07:40 PM   #6
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,060
This should do it.
Attached Files
File Type: zip NoRealm.zip (597 Bytes, 858 views)
  Reply With Quote
03-26-12, 10:50 AM   #7
Worcester
A Deviate Faerie Dragon
 
Worcester's Avatar
Join Date: Apr 2008
Posts: 13
Thank you, gentlemen! I'll add this as soon as I get home. Your help is appreciated!
__________________
I prefer rogues to imbeciles, because they sometimes take a rest.
--Alexandre Dumas
  Reply With Quote
03-27-12, 07:43 AM   #8
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,060
Sorry, I just found out this won't work with prat. Prat adds a ton of stuff to the player link and my pattern can't match it.

I'm working on a solution and should have it fixed later today. You can download it here when it's updated.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Search/Requests » Chat--Hide Realm Name


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