WoWInterface SVN StopTradeSpam

Compare Revisions

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

Rev 42 → Rev 41

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]?"] = 20,
["%d+%.%d%d?%s?[Ee][Uu][Rr][Oo]?"] = 15,
["[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]?"] = 20,
["%d+%.%d%d?%s?[Ee][Uu][Rr][Oo]?"] = 15,
["[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]?"] = 20
STS_SV["enUS"]["list"]["%d+%.%d%d?%s?[Ee][Uu][Rr][Oo]?"] = 20
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"]["[Vv]erkauf"] = -2
end
 
trunk/StopTradeSpam/StopTradeSpam.lua
56,9 → 56,6
j = nil
end
end
elseif select(1,...) == "ignore"
STS_SV["ignore"][tignlist] = nil
STS_SV["ignore"][tignlist] = { }
else
STS_SV = nil
end
101,7 → 98,7
function STS_List(...)
local list = select(1,...)
if list == "white" or list == "black" then
dcfa(gsub(list,"^%a",strupper).."list entrys:") --TODO: locale
dcfa(gsub(list,"^%a",strupper).."list entrys:")
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)
121,7 → 118,7
 
function STS_Find(key, list)
if list == "white" or list == "black" then
dcfa(gsub(list,"^%a",strupper).."list entrys:") --TODO: locale
dcfa(gsub(list,"^%a",strupper).."list entrys:")
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)
135,7 → 132,7
if key == "raid" then
imax = 40
end
dcfa("Following persons in this "..key.." are T-ignored:") --TODO: locale
dcfa("Following persons in this "..key.." are T-ignored:")
for i=1,imax do
if STS_SV["ignore"][tignlist][UnitName(key..i)] then
spammers = spammers..STS_ColoredNameLink(nil,UnitName(key..i))..", "
148,7 → 145,7
if spammers ~= "" then
dcfa(strsub(spammers,1,-3))
else
dcfa("No one in your "..key.." is T-ignored.") --TODO: locale
dcfa("No one in your "..key.." is T-ignored.")
end
elseif list == "ignore" then
if STS_SV["ignore"][tignlist][key] then
166,7 → 163,7
 
function STS_PostReason(ign_name)
if not STS_SV["ignore"][tignlist][ign_name] then
dcfa("\""..ign_name.."\" not found on T-ignorelist.")
dcfa("\""..ign_name.."\" not forund 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)
222,23 → 219,23
end
end
if not key then
dcfa("Wrong parameters. Use /sts add white [entry] or /sts add black [entry].")
dcfa("Error, couldn't add new filter.")
elseif list == "white" or list == "black" then
STS_SV[sts_lang]["list"][key] = val
dcfa("Filter added to "..list.."list: "..key) --TODO: locale and value
dcfa("Filter added to "..list.."list: "..key)
return true
else
dcfa("Wrong parameters. Use /sts add white [entry] or /sts add black [entry] .")--TODO: locale and explain new
dcfa("Wrong parameters: "..list..". Use /sts add white or /sts add black .")--TODO: explain new
end
return false
end
 
function STS_Remove(key, list)
if list ~= "white" and list ~= "black" then
dcfa("Wrong parameters. Use /sts remove white [entry] or /sts remove black [entry] .")--TODO: change function and locale
dcfa("Wrong parameters: "..list..". Use /sts remove white [entry] or /sts remove black [entry] .")
return false
end
--[[ has to be rewritten TODO!!!
--[[ has to be rewritten
local entry = tonumber(key)
if type(entry) ~= "number" then
local entry = STS_Find(key, list)
318,7 → 315,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.")
333,7 → 330,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 to default, T-ignorelist is not resetted")
dcfa("\124cffff0000/sts reset \124cff00ff00Reset language setting, language filters and T-ignorelist to default")
elseif STScommand[1] == "reset" then
STS_ResetSV()
STS_InitSV()
trunk/StopTradeSpam/locale.lua File deleted \ No newline at end of file