WoWInterface SVN StopTradeSpam

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 41 to Rev 42
    Reverse comparison

Rev 41 → Rev 42

trunk/StopTradeSpam/init.lua
75,7 → 75,7
["[Gg]earscore"] = 1,
["[Cc]huck "] = 1,
[" [Nn]orris"] = 1,
["%d+%.%d%d?%s?[Ee][Uu][Rr][Oo]?"] = 15,
["%d+%.%d%d?%s?[Ee][Uu][Rr][Oo]?"] = 20,
["[Pp]aypal"] = 10,
[".berweisung"] = 10,
["mmo%w+%.com"] = 10,
120,7 → 120,7
["%.cn$"] = 10,
["[Vv][Oo][Aa]% ?[12][05]"] = 1,
["[Tt][Oo]?[Gg]?[Cc]% ?[12][05]"] = 1,
["%d+%.%d%d?%s?[Ee][Uu][Rr][Oo]?"] = 15,
["%d+%.%d%d?%s?[Ee][Uu][Rr][Oo]?"] = 20,
["[Pp]aypal"] = 10,
["mmo%w+%.com"] = 10,
},
217,8 → 217,8
STS_SV["deDE"]["list"]["[Pp]aypal"] = 10
STS_SV["enUS"]["list"]["[Pp]aypal"] = 10
STS_SV["deDE"]["list"][".berweisung"] = 10
STS_SV["deDE"]["list"]["%d+%.%d%d?%s?[Ee][Uu][Rr][Oo]?"] = 15
STS_SV["enUS"]["list"]["%d+%.%d%d?%s?[Ee][Uu][Rr][Oo]?"] = 15
STS_SV["deDE"]["list"]["%d+%.%d%d?%s?[Ee][Uu][Rr][Oo]?"] = 20
STS_SV["enUS"]["list"]["%d+%.%d%d?%s?[Ee][Uu][Rr][Oo]?"] = 20
STS_SV["deDE"]["list"]["[Vv]erkauf"] = -2
end
 
trunk/StopTradeSpam/StopTradeSpam.lua
56,6 → 56,9
j = nil
end
end
elseif select(1,...) == "ignore"
STS_SV["ignore"][tignlist] = nil
STS_SV["ignore"][tignlist] = { }
else
STS_SV = nil
end
98,7 → 101,7
function STS_List(...)
local list = select(1,...)
if list == "white" or list == "black" then
dcfa(gsub(list,"^%a",strupper).."list entrys:")
dcfa(gsub(list,"^%a",strupper).."list entrys:") --TODO: locale
for le,lv in pairs(STS_SV[sts_lang]["list"]) do
if (list == "white" and lv < 0) or (list == "black" and lv > 0) then
dcfa("\""..le.."\" : "..lv)
118,7 → 121,7
 
function STS_Find(key, list)
if list == "white" or list == "black" then
dcfa(gsub(list,"^%a",strupper).."list entrys:")
dcfa(gsub(list,"^%a",strupper).."list entrys:") --TODO: locale
for le,lv in pairs(STS_SV[sts_lang]["list"]) do
if key == le and ((list == "white" and lv < 0) or (list == "black" and lv > 0)) then
dcfa("\""..le.."\" : "..lv)
132,7 → 135,7
if key == "raid" then
imax = 40
end
dcfa("Following persons in this "..key.." are T-ignored:")
dcfa("Following persons in this "..key.." are T-ignored:") --TODO: locale
for i=1,imax do
if STS_SV["ignore"][tignlist][UnitName(key..i)] then
spammers = spammers..STS_ColoredNameLink(nil,UnitName(key..i))..", "
145,7 → 148,7
if spammers ~= "" then
dcfa(strsub(spammers,1,-3))
else
dcfa("No one in your "..key.." is T-ignored.")
dcfa("No one in your "..key.." is T-ignored.") --TODO: locale
end
elseif list == "ignore" then
if STS_SV["ignore"][tignlist][key] then
163,7 → 166,7
 
function STS_PostReason(ign_name)
if not STS_SV["ignore"][tignlist][ign_name] then
dcfa("\""..ign_name.."\" not forund on T-ignorelist.")
dcfa("\""..ign_name.."\" not found on T-ignorelist.")
else
local answer = STS_SV["ignore"][tignlist][ign_name]["time"].." "..STS_SV["ignore"][tignlist][ign_name]["reason"]
answer = gsub(answer,"|Hplayer:.+|h|.+|r|h", ign_name)
219,23 → 222,23
end
end
if not key then
dcfa("Error, couldn't add new filter.")
dcfa("Wrong parameters. Use /sts add white [entry] or /sts add black [entry].")
elseif list == "white" or list == "black" then
STS_SV[sts_lang]["list"][key] = val
dcfa("Filter added to "..list.."list: "..key)
dcfa("Filter added to "..list.."list: "..key) --TODO: locale and value
return true
else
dcfa("Wrong parameters: "..list..". Use /sts add white or /sts add black .")--TODO: explain new
dcfa("Wrong parameters. Use /sts add white [entry] or /sts add black [entry] .")--TODO: locale and explain new
end
return false
end
 
function STS_Remove(key, list)
if list ~= "white" and list ~= "black" then
dcfa("Wrong parameters: "..list..". Use /sts remove white [entry] or /sts remove black [entry] .")
dcfa("Wrong parameters. Use /sts remove white [entry] or /sts remove black [entry] .")--TODO: change function and locale
return false
end
--[[ has to be rewritten
--[[ has to be rewritten TODO!!!
local entry = tonumber(key)
if type(entry) ~= "number" then
local entry = STS_Find(key, list)
315,7 → 318,7
if STScommand[1] == "help" or argument == "" then
dcfa("\124cffff0000S\124cff00ff00top \124cffff0000T\124cff00ff00rade \124cffff0000S\124cff00ff00pam")
dcfa("StopTradeSpam will, based on your whitelist and blacklist automatically try to ignore players, who are looking for groups/raids/... in trade channel.")
dcfa("Maybe in a future version it will Report Spam to gamemasters, but thats a bad idea with unreliable filtering.")
-- dcfa("Maybe in a future version it will Report Spam to gamemasters, but thats a bad idea with unreliable filtering.")
dcfa("\124cff00ff00List of usable commands:")
dcfa("\124cffff0000/sts list <white/black/ignore> \124cff00ff00Lists all entrys of the specified list.")
dcfa("\124cffff0000/sts find <white/black/ignore> <entry> \124cff00ff00Looks for an entry which is exactly <entry> in the specified list. If no list is specified it will search the T-ignorelist.")
330,7 → 333,7
dcfa("\124cffff0000/sts raid \124cff00ff00Lists all raid members who are on your T-ignorelist.")
dcfa("\124cffff0000/sts version \124cff00ff00Shows the current version number.")
dcfa("\124cffff0000/sts options \124cff00ff00Not yet working.")
dcfa("\124cffff0000/sts reset \124cff00ff00Reset language setting, language filters and T-ignorelist to default")
dcfa("\124cffff0000/sts reset \124cff00ff00Reset language setting, language filters to default, T-ignorelist is not resetted")
elseif STScommand[1] == "reset" then
STS_ResetSV()
STS_InitSV()
trunk/StopTradeSpam/locale.lua
0,0 → 1,37
sts_locale = {
["newlang_att"] = "New language \"%s\" created.",
["langnotfound_att"] = "Language \"%s\" not found.",
["langremoved_att"] = "Language and filters of \"%s\" removed.",
["tignore_entrys"] = "STS-ignorelist entrys:",
["wp_list_att"] = "Wrong parameters: \"%s\". Use /sts list white or /sts list black or /sts list ignore .",
["wp_list"] = "Wrong parameters: Use /sts list white or /sts list black or /sts list ignore .",
["findignore_nomatch"] = "No exact match found. Note: Parameter name is case sensitive.",
["wp_find_att"] = "Wrong parameters: \"%s\". Use /sts find white [entry] or /sts find black [entry] or /sts find ignore [name].",
["postreason_nomatch_att"] = "\"%s\" not found on T-ignorelist.",
["addignore_success_noreason_att"] = "New T-ignore: %s",
["addignore_success_reasongiven_2att"] = "%s is now T-ignored. Reason: %s",
["addignore_err_alreadyign_att"] = "Character is already ignored. Use \"/sts unignore %s\" to remove him from T-ignorelist.",
["delignore_success_att"] = "%s is no longer T-ignored.",
["delignore_err_nomatch_att"] = "Character %s not found on T-ignorelist.",
["wp_add_err_nokey"] = "Wrong parameters: Use /sts add white [entry] or /sts add black [entry].",
["removefilter_success_att"] = "Entry \"%s\" removed.",
["removefilter_err_nomatch"] = "Entry not found.",
["stat_notification_3datt"] = "Trade messages filtered this session: %d of %d. There are %d characters on your T-ignorelist.",
["help2"] = "StopTradeSpam will, based on your whitelist and blacklist automatically try to ignore players, who are looking for groups/raids/... in trade channel.",
["help4"] = "List of usable commands:",
["help5"] = "Lists all entrys of the specified list.",
["help6"] = "Looks for an entry which is exactly <entry> in the specified list. If no list is specified it will search the T-ignorelist.",
["help7"] = "T-ignores someone, with reason, if given.",
["help8"] = "Removes someone from your T-ignore list.",
["help9"] = "Used to add a new filter pattern to the specified list.",
["help10"] = "Used to delete a filter pattern from a specified list.",
["help11"] = "possible options are \"enUS\" (english), \"deDE\" (german) or any other (a few default filters will be set)",
["help12"] = "Prints a short session statistic",
["help13"] = "Whispers the reason and the time of his T-ignore to the character <name>.",
["help14"] = "Lists all party members who are on your T-ignorelist.",
["help15"] = "Lists all raid members who are on your T-ignorelist.",
["help16"] = "Shows the current version number.",
["help17"] = "Not yet working.",
["help18"] = "Reset language setting, language filters to default, T-ignorelist is not resetted",
["wp_general"] = "Wrong parameters.",
}
\ No newline at end of file