Quantcast

Use string.gsub instead of string.replace.

Christopher Rosell [06-29-11 - 18:33]
Use string.gsub instead of string.replace.
Filename
Moniker.toc
hooks.lua
locale/enGB.lua
moniker.lua
diff --git a/Moniker.toc b/Moniker.toc
old mode 100644
new mode 100755
index 778934b..ca836f6
--- a/Moniker.toc
+++ b/Moniker.toc
@@ -1,7 +1,7 @@
-## Interface: 40000
+## Interface: 40200
 ## Title: Moniker
 ## Notes: Give your RealID friends nicknames
-## Version: 1.5
+## Version: 1.5.1
 ## Author: Christopher Rosell
 ## X-Email: chrippa@gmail.com
 ## X-Category: Social
diff --git a/hooks.lua b/hooks.lua
old mode 100644
new mode 100755
index 02bfe20..de42477
--- a/hooks.lua
+++ b/hooks.lua
@@ -10,7 +10,7 @@ local function ReplaceText(frame)

 		for orig, nick in addon:IterNicknames() do
 			if text:find(orig, nil, true) then
-				return frame:SetText(text:replace(orig, nick))
+				return frame:SetText(text:gsub(orig, nick))
 			end
 		end
 	end
diff --git a/locale/enGB.lua b/locale/enGB.lua
old mode 100644
new mode 100755
diff --git a/moniker.lua b/moniker.lua
old mode 100644
new mode 100755