Thread Tools Display Modes
12-13-10, 12:15 PM   #1
Shialla
A Deviate Faerie Dragon
 
Shialla's Avatar
Join Date: Sep 2007
Posts: 16
Exclamation Update or replacement for NameViolation

Pretty much as the subject says, I would be super eternally grateful if someone would either update NameViolation or come up with a successor to it. Its not been updated since 3.3 and no longer works at all.

*big sad kitten eyes*
PLEEEEEEEEEEEASSSSE?
  Reply With Quote
12-14-10, 01:53 AM   #2
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
You should probably include a link to the addon's download page, as well as the text of whatever error messages it's throwing in the current version of WoW.
  Reply With Quote
12-14-10, 02:28 PM   #3
Shialla
A Deviate Faerie Dragon
 
Shialla's Avatar
Join Date: Sep 2007
Posts: 16
Originally Posted by Phanx View Post
You should probably include a link to the addon's download page, as well as the text of whatever error messages it's throwing in the current version of WoW.
Oops. My bad.

http://www.wowinterface.com/download...Violation.html

As for an error, it doesn't throw one out, it simply doesn't work at all. When it did you would right click on someone's portrait frame and in the options there would be Report Name and it would make a note with set text for the GM and up to 8 or so names that you had collected. You would then paste that into a ticket and send it in.

I sent a PM to Wachunga back in August and he directed me to fincasann but he hasn't responded to my PMs at all, or any comments that the addon is broken -- So I think its abandoned.

There is nothing like it out there anywhere -- I've looked -- And really I would be really grateful for an update/replacement. I am on a very high pop RP server and run a guild there and we're literally overrun with people who have obnoxious and offensive names.

Thanks for at least replying Phanx!
  Reply With Quote
12-14-10, 09:59 PM   #4
Shialla
A Deviate Faerie Dragon
 
Shialla's Avatar
Join Date: Sep 2007
Posts: 16
Okay, after a while it did finally pop out an error message oddly enough when I did a manual reloadui. Though I had logged in and out of game several times prior with no message or error. Anyway...

Message: Interface\AddOns\NameViolation\NameViolation.lua:46: attempt to index global 'this' (a nil value)
Time: 12/14/10 22:57:48
Count: 1
Stack: Interface\AddOns\NameViolation\NameViolation.lua:46: in function `NameViolation_OnLoad'
[string "*:OnLoad"]:1: in function <[string "*:OnLoad"]:1>

Locals: (*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = "attempt to index global 'this' (a nil value)"
defaults = <table> {
ReportSalutation = "Dear Game Master,"
Guilds = true
TargetPopup = true
ReportClosing = "Thank you for looking into this,"
RaidPopup = false
ReportOpening = "The following name(s) violate the Naming Policy:"
PetPopup = true
PartyPopup = false
WhoPopup = true
ShowCategories = true
FriendPopup = false
GuildPopup = false
ChatPopup = true
}
  Reply With Quote
12-15-10, 05:39 PM   #5
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
The global this, event, and argN variables were removed in Patch 4.0.1, as was the getglobal function. These things were all deprecated long before that, but many addons were lazy and continued to use them, or were written based on outdated or poorly written references. NameViolation appears to have been written in 2008, so "lazy" and/or "outdated references" would seem to apply.

The whole code in general is pretty horrifying, but I don't have time to rewrite it. Try making these changes. I'm at work, so I can't test them myself right now.

NameViolation.xml
  1. Search for all instances of "this" and replace them with "self".
  2. Change line 6 to:
    Code:
    NameViolation_OnLoad(self);
  3. Change line 9 to:
    Code:
    NameViolation_OnEvent(self, event, ...);
  4. Change line 30 to:
    Code:
    self.text = _G[self:GetName().."Text"];
  5. Change line 245 to:
    Code:
    NameViolationReport_OnLoad(self);
  6. Change line 248 to:
    Code:
    NameViolationReport_OnShow(self)
  7. Change line 257 to:
    Code:
    NameViolationReport_OnHide()
  8. Search for all instances of:
    Code:
    getglobal(this:GetName().."Text")
    ... and replace them with:
    Code:
    _G[self:GetName().."Text"];
NameViolation.lua
  • Search for all instances of "this" and replace them with "self".
  • Replace line 45 with:
    Code:
    function NameViolation_OnLoad(self)
  • Replace line 88 with:
    Code:
    function NameViolation_OnEvent(self, event, ...)
  • Replace line 328 with:
    Code:
    local text = _G["DropDownList"..level.."Button"..id].value;
  • Replace lines 385 with:
    Code:
    local dropdownMenu = UIDROPDOWNMENU_INIT_MENU;
  • Replace line 492 with:
    Code:
    function NameViolation_UnitPopup_OnClick(self, button)
  • Replace lines 494 with:
    Code:
    local dropdownMenu = UIDROPDOWNMENU_INIT_MENU;

Report back with any error messages triggered.
  Reply With Quote
12-15-10, 11:12 PM   #6
Shialla
A Deviate Faerie Dragon
 
Shialla's Avatar
Join Date: Sep 2007
Posts: 16
No error until I tried to grab a name for the report, and when I selected the category on the dropdown menu, I got the following:

Message: Interface\AddOns\NameViolation\NameViolation.lua:509: attempt to index global 'dropdownFrame' (a nil value)
Time: 12/16/10 00:10:25
Count: 1
Stack: Interface\AddOns\NameViolation\NameViolation.lua:509: in function `func'
Interface\FrameXML\UIDropDownMenu.lua:636: in function `UIDropDownMenuButton_OnClick'
[string "*:OnClick"]:1: in function <[string "*:OnClick"]:1>

Locals: self = DropDownList2Button20 {
0 = <userdata>
hookedfix = true
value = "TITLE"
owner = "NAME_VIOLATION"
func = <function> defined @Interface\AddOns\NameViolation\NameViolation.lua:502
tooltipTitle = "Title (e.g., Kingmike, Presidentsanchez)"
}
button = nil
dropdownMenu = TargetFrameDropDown {
0 = <userdata>
unit = "target"
displayMode = "MENU"
name = "Unholytank"
initialize = <function> defined @Interface\FrameXML\TargetFrame.lua:672
selectedLootMethod = "Loot: Group Loot"
selectedLootThreshold = "Uncommon"
which = "NAME_VIOLATION"
}
menuValue = "NAME_VIOLATION"
(*temporary) = <function> defined @Interface\AddOns\NameViolation\NameViolation.lua:259
(*temporary) = nil
(*temporary) = "TITLE"
(*temporary) = 16
(*temporary) = 1
(*temporary) = "attempt to index global 'dropdownFrame' (a nil value)"
Original_UnitPopup_OnClick = <function> defined @Interface\FrameXML\UnitPopup.lua:1216
  Reply With Quote
12-16-10, 07:26 AM   #7
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
I think you may have made an error in applying the corrections, as line 509 in NameViolation.lua does not reference dropdownFrame. I'll try to test tomorrow.
  Reply With Quote
12-16-10, 07:55 AM   #8
Shialla
A Deviate Faerie Dragon
 
Shialla's Avatar
Join Date: Sep 2007
Posts: 16
Originally Posted by Phanx View Post
I think you may have made an error in applying the corrections, as line 509 in NameViolation.lua does not reference dropdownFrame. I'll try to test tomorrow.
I was having issues with Notepad++ I'll start over and try to apply the corrections again and see if that's it.

Here is the latest attempt I replaces the name I used with asdfg:

Message: Interface\FrameXML\UnitPopup.lua:1218: attempt to index local 'self' (a nil value)
Time: 12/16/10 16:32:40
Count: 4
Stack: Interface\FrameXML\UnitPopup.lua:1218: in function <Interface\FrameXML\UnitPopup.lua:1216>
Interface\AddOns\NameViolation\NameViolation.lua:493: in function `func'
Interface\FrameXML\UIDropDownMenu.lua:636: in function `UIDropDownMenuButton_OnClick'
[string "*:OnClick"]:1: in function <[string "*:OnClick"]:1>

Locals: self = nil
dropdownFrame = TargetFrameDropDown {
0 = <userdata>
unit = "target"
displayMode = "MENU"
name = "asdfg"
initialize = <function> defined @Interface\FrameXML\TargetFrame.lua:672
selectedLootMethod = "Loot: Group Loot"
selectedLootThreshold = "Uncommon"
which = "NAME_VIOLATION"
}
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = "attempt to index local 'self' (a nil value)"

Last edited by Shialla : 12-16-10 at 03:36 PM.
  Reply With Quote
12-16-10, 09:37 PM   #9
Shialla
A Deviate Faerie Dragon
 
Shialla's Avatar
Join Date: Sep 2007
Posts: 16
And I figured out how I messed up, just forgot to mention it. When I was first applying the corrections, I was applying them to a already patched (but still not working) copy of the addon, and that version had all the extra spacing.
  Reply With Quote
12-16-10, 11:35 PM   #10
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Originally Posted by Shialla View Post
I replaces the name I used with asdfg
I don't know what that means...

But, to fix the error message you posted, change line 493 in NameViolation.lua to this:
Code:
Original_UnitPopup_OnClick(self)

Last edited by Phanx : 12-16-10 at 11:40 PM.
  Reply With Quote
12-17-10, 04:06 AM   #11
Jigain
A Molten Giant
 
Jigain's Avatar
Join Date: Jul 2009
Posts: 732
Originally Posted by Phanx View Post
I don't know what that means...
It's not part of the code, he just means that if, for example, he tried reporting Jigain, instead of showing Jigain's name he's using the substitution of "asdfg".
__________________


  Reply With Quote
12-17-10, 11:57 AM   #12
Shialla
A Deviate Faerie Dragon
 
Shialla's Avatar
Join Date: Sep 2007
Posts: 16
Originally Posted by Jigain View Post
It's not part of the code, he just means that if, for example, he tried reporting Jigain, instead of showing Jigain's name he's using the substitution of "asdfg".
Yes, what he said. I don't think it would be allowed to publish the name I actually pulled with the addon so I changed it to random gibberish -- Knowing WoW though, someone actually has that name
  Reply With Quote
12-17-10, 06:35 PM   #13
Shialla
A Deviate Faerie Dragon
 
Shialla's Avatar
Join Date: Sep 2007
Posts: 16
Next error:

Message: Interface\AddOns\NameViolation\NameViolation.lua:499: attempt to index global 'dropdownFrame' (a nil value)
Time: 12/17/10 19:31:44
Count: 1
Stack: Interface\AddOns\NameViolation\NameViolation.lua:499: in function `func'
Interface\FrameXML\UIDropDownMenu.lua:636: in function `UIDropDownMenuButton_OnClick'
[string "*:OnClick"]:1: in function <[string "*:OnClick"]:1>

Locals: self = DropDownList2Button18 {
0 = <userdata>
hookedfix = true
value = "GIBBERISH"
owner = "NAME_VIOLATION"
func = <function> defined @Interface\AddOns\NameViolation\NameViolation.lua:492
tooltipTitle = "Unpronounceable gibberish (e.g., Jjxccm)"
}
button = nil
dropdownMenu = TargetFrameDropDown {
0 = <userdata>
unit = "target"
displayMode = "MENU"
name = "somename"
initialize = <function> defined @Interface\FrameXML\TargetFrame.lua:672
selectedLootMethod = "Loot: Group Loot"
selectedLootThreshold = "Uncommon"
which = "NAME_VIOLATION"
}
menuValue = "NAME_VIOLATION"
(*temporary) = <function> defined @Interface\AddOns\NameViolation\NameViolation.lua:238
(*temporary) = nil
(*temporary) = "GIBBERISH"
(*temporary) = 14
(*temporary) = 1
(*temporary) = "attempt to index global 'dropdownFrame' (a nil value)"
Original_UnitPopup_OnClick = <function> defined @Interface\FrameXML\UnitPopup.lua:1216
  Reply With Quote
01-01-11, 11:40 PM   #14
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Okay, there was an error in my original list of changes. Line 494 in NameViolation.lua should define local dropdownFrame, not local dropdownMenu, so it should look like this:
Code:
local dropdownFrame = UIDROPDOWNMENU_INIT_MENU;
Also, for future reference, posting the list of locals that your error tool appends to error messages is generally a waste of space. In 99% of cases, the error message is self-explanatory. In fact, I don't think I've ever seen an error report where the locals list was useful... I don't know why Blizzard shows it by default. :\

Last edited by Phanx : 01-01-11 at 11:44 PM.
  Reply With Quote
01-02-11, 03:34 PM   #15
Shialla
A Deviate Faerie Dragon
 
Shialla's Avatar
Join Date: Sep 2007
Posts: 16
Originally Posted by Phanx View Post
Okay, there was an error in my original list of changes. Line 494 in NameViolation.lua should define local dropdownFrame, not local dropdownMenu, so it should look like this:
Code:
local dropdownFrame = UIDROPDOWNMENU_INIT_MENU;
Also, for future reference, posting the list of locals that your error tool appends to error messages is generally a waste of space. In 99% of cases, the error message is self-explanatory. In fact, I don't think I've ever seen an error report where the locals list was useful... I don't know why Blizzard shows it by default. :\
Ah gotcha, sorry about that. I just posted what popped up on the error frame. Thank you though!
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Search/Requests » Update or replacement for NameViolation


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