Parental controls don't let you limit which characters can be played.
I also peeked at the linked addon's code, and it's pretty messy. It also seems a little overcomplicated for what it needs to do. Here's a simpler version; rather than in-game slash commands you can just edit the file in Notepad to change the password and add/remove characters that don't require a password.
Code:
local PASSWORD = "YourPasswordHere"
local ALLOWED_CHARACTERS = {
["Server Name - Charactername"] = true,
}
------------------------------------------------------------------------
-- End of configuration
------------------------------------------------------------------------
local logout, total = 0, 0
local f = CreateFrame("Frame", "CharLockFrame", WorldFrame)
local t3 = f:CreateFontString(nil, "OVERLAY", "GameFontNormalLarge")
f:Hide()
f:RegisterEvent("PLAYER_ENTERING_WORLD")
f:SetScript("OnEvent", function(self)
self:UnregisterAllEvents()
if ALLOWED_CHARACTERS[format("%s - %s", GetRealmName(), (UnitName("player")))] then return end
self:SetAllPoints(true)
self:SetFrameStrata("FULLSCREEN_DIALOG")
local tx = self:CreateTexture(nil, "ARTWORK")
tx:SetAllPoints(true)
tx:SetTexture(0, 0, 0, 1)
local t1 = self:CreateFontString(nil, "OVERLAY", "GameFontNormalLarge")
t1:SetPoint("BOTTOM", self, "CENTER", 0, 10)
t1:SetText("Enter your password to unlock this character.")
local t2 = self:CreateFontString(nil, "OVERLAY", "GameFontHighlightSmall")
local eb = CreateFrame("EditBox", "$parentEditBox", self, "InputBoxTemplate")
eb:SetPoint("TOP", self, "CENTER", 0, -10)
eb:SetSize(160, 24)
eb:SetAltArrowKeyMode(false)
eb:SetScript("OnEnterPressed", function(this)
if this:GetText() == PASSWORD then
self:Hide()
else
t2:Show()
end
end)
t2:SetPoint("TOP", eb, "BOTTOM")
t2:SetText("|T"..STATICPOPUP_TEXTURE_ALERT..":0|t |cffff6666Wrong password!|r")
t2:Hide()
t3:SetPoint("TOP", t2, "BOTTOM", 0, -10)
t3.format = "You will be logged out in %d seconds."
total = 30
logout = IsResting() and 10 or 30
self:Show()
end)
f:SetScript("OnUpdate", function(self, elapsed)
total = total - elapsed
t3:SetFormattedText(t3.format, total)
if logout then
logout = logout - elapsed
if logout < 0 then
Logout()
end
logout = nil
end
end)
If you need help turning the above code into an addon, copy and paste it into this page:
http://addon.bool.no/