-
Posted by blackknight95857669 on Sat, 11 Jul 2009 16:08:11
I recently assumed authorship of Eloquence-Fan Update. I'm pretty green when it comes to Lua. I've been cleaning up the code and updating things that were obviously out of date.
I've now hit a wall.
Ever since the 3.0 patch Elo has been killing Achievement and Profession links. All the other links are still being skipped correctly. While it is certainly possible to bypass this bug using the /elo skipword command, that then makes Elo skip the entire sentence, instead of just skipping the link. Which sort of defeats the purpose of Elo, you know? All I'd like to do is add these links to Elo's .. internal skiplist, for lack of a better term.
I bought the book and it's been very helpful, but since this mod is a little different than pretty much all other chat mods, it's coming up a tad short.
There are two snippets of code that I'm sure are involved.
From the Eloquence.lua:
local magicchars = "([-?*+%%^$\"()%[%].])" local function safecapture(msg) return gsub(msg,"%%?"..magicchars,"%%%1") end local function unsafecapture(msg) return gsub(msg,"%%"..magicchars,"%1") end
From the Abbreviations.lua:
local function filterwordsonly(msg,filter) if msg and filter then for a,b in pairs(filter) do for k,v in pairs(b) do msg = gsub(msg,"%f[%a]"..k.."^%f[%a%d|[]",v) end end end return msg end
The most obvious issue is the fact that the original author failed to pay attention to your warning to NOT use shorthand.. I have yet to figure out what the a,b,k or v might stand for exactly..
I'm hoping somebody that knows Lua much better than I might catch on to what's happening here better than I have. I get how the links are skipped, what I'm having a problem with is figuring out how/if I can adjust the current code or if I have to add an elseif or new function to cover the Profession/Achievement links. Everything I've tried hasn't worked.
I'm well aware the code in this mod is old lol. Considering that it was first released in Dec 2005 I think it's safe to assume the original author was probably working on it when WoW was in beta. I'm learning Lua specifically with recoding the mod in mind. However, I'm looking at possibly recoding 10 Lua files and some XML files as well. I'd like for the mod to work correctly as is so I can buy myself time to learn enough to actually do that.
So, any suggestions? Any help anyone could give me would be truly appreciated.
-
Posted by blackknight95857669 on Wed, 22 Jul 2009 21:42:59
Should I just assume that it's a lost cause?
-
Posted by jnwhiteh on Wed, 22 Jul 2009 22:35:40
No, I just don't really have the time to dig into the addon at the moment and help you figure it out. You may want to post on the http://wowinterface.com or http://wowace.com focums and see if they can offer you any further information. I'll try to look at it when I can, but I'm flush with deadlines at the moment.
Sorry that I let this post slip by, I'll try.
-
Posted by blackknight95857669 on Wed, 22 Jul 2009 22:44:50
Fully understand that life comes first, trust me. Thanks for replying, and if you do get the time I'd really appreciate the help. I tried WowAce and pretty much all I got was "It's old code, recode it". Heh. I'll try WowI too.
-
Posted by blackknight95857669 on Thu, 12 Nov 2009 17:13:23
Well it's been a few months, and I've been reading the Lua manuals and I've learned more about how it works, however I've still not managed to figure out how to fix the code and get this addon back to full working order. I've been incredibly frustrated as it seems like it's right in front of me but I just can't see it.
I still understand if you are too busy to dig into this problem, I'm just hoping that maybe you have a little time to try and run down the code and spot what I'm missing and point it out to me. I appreciate whatever time you may have to devote to it, even if it's just to answer this and tell me no :)
At least most of the users have been fairly nice about its being bugged and how long I've been working on it heh.
-
Posted by jnwhiteh on Thu, 12 Nov 2009 18:03:12
I'll do what I can, but I cannot make any promises. The problem is that I don't understand the code any better than you do, so working my way through to tell you what you're missing.. I might as well just fix the addon because its going to take the same amount of time. That's really the problem =/
-
Posted by blackknight95857669 on Thu, 12 Nov 2009 22:19:28
I'll do what I can, but I cannot make any promises. The problem is that I don't understand the code any better than you do, so working my way through to tell you what you're missing.. I might as well just fix the addon because its going to take the same amount of time. That's really the problem =/
I was afraid you were going to say that T_T
Oh well, if you can find the time and/or figure it out that would be fab, but I'm not going to hold my breath :) No pressure :D I'm sure I might figure it out before it becomes moot.. >.> <.< I hope..