Thread Tools Display Modes
12-16-16, 09:34 PM   #1
naxxilium
A Defias Bandit
Join Date: Dec 2016
Posts: 3
Need help: Removing realm-name from AddOn

Can anyone look at the code of this AddOn and see if it's possible to remove realm-name from the feed?
It currently looks like this and it would be a lot cleaner if the realm names weren't included
  Reply With Quote
12-17-16, 09:28 AM   #2
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Code:
name = name:gsub('%-.*', '')
  Reply With Quote
12-17-16, 10:06 AM   #3
Banknorris
A Chromatic Dragonspawn
 
Banknorris's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 153
or
Code:
name = name:match("[^-]+")
__________________
"In this world nothing can be said to be certain, except that fractional reserve banking is a Ponzi scheme and that you won't believe it." - Mandrill

Last edited by Banknorris : 12-17-16 at 10:11 AM.
  Reply With Quote
12-17-16, 11:32 AM   #4
naxxilium
A Defias Bandit
Join Date: Dec 2016
Posts: 3
Originally Posted by p3lim View Post
Code:
name = name:gsub('%-.*', '')
where would i put this in the current code?
  Reply With Quote
12-17-16, 01:24 PM   #5
naxxilium
A Defias Bandit
Join Date: Dec 2016
Posts: 3
nevermind, i figured it out - thanks for the help guys
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Need help: Removing realm-name from AddOn

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