Автор: Sunshine-hub 14.8.2009, 16:26
Господа, прошу помощи.
Постоянно лезет ошибка, но где не хватает в 70й строке закрывающей скобки не вижу.
[16:18] Синтаксис C:\PtokaX\scripts\NoDescAdv.lua:70: malformed pattern (missing ']')
CODE
--[[###################################################################################
NoDescAdv v1.01 by alex82
http://mydc.ru/topic1929.html
--###################################################################################]]--
-- НАСТРОЙКИ СКРИПТА
iSendTimer = 500 -- Время отправки MyINFO, ms
tAdv = {"http","www","ftp","adc://","d c h u b","dchub","Dchub","dChub","dcHub","dchUb","dchuB","DChub","DcHub","DchUb",
"DchuB","DCHub","DCHUb","DCHuB","DCHUB","DcHUb","DcHuB","DcHUB","DchUB","DcHuB","homedns","servegame","pups",
"small-hub","no-ip","yes-ip","selfip","ip-home",".com","tulgu","kozlovka","dyndns","destroyteam.biz","guhap",
"zeitgeistmovie","angel.karumo.pp.ru","sytes.net","kyh","podzone","sipha","topplaylist","sportxab","ixbb","jentune",
"sloboda.net","donet","yarzabor","dc.laros-g.ru","depositfiles","karumo.pp.ru","you-kiss.ru","smart9x","ucoz",
"DAYMOVIE","satdv","го го го","go go go","гогого","gogogo","приглашаю на","Заходите на","BAN","portal","mymcomm",
"dc.ozerki.net","avangard-hub","INTERFILM","khdc","Elektrichka","game-mirportal","chitamedia","myminicity","wow",
"bigshare.aa.am:100","zatramvaj","galawars","Pushkinskiy","fresh-leaf","besthub","Адвего","bratuxa","game-server",
"icq-halyava","Uahub","uniongang","marino-hab","upload.net","wow-russian","battleknight","speedhub","maryno.net",
"u c o z","ucoz","arbital","ssp.dsv.ru","pronet.iax","сherepovets","dcmetalhub","favorit-hub","hw-project",
"radiorecord","corbina.","filmaxx","ayazmaserver","l a b e j a","cotroceni","dc.hubul.ro","servehalflife","Hacoc.ru",
"dwar-gold","disneyjazz","aeroportuchta","pronet.iax.be","hubs/725/","vkontakte.ru","narod.ru","narod2.ru",
"10.",":666",":412",":411",":1209",":2009",":27015",":27017",":2046",":4111",":9217",
"217.76.190.196","88.85.214.232","95.52.20.19","77.223.85.215","93.157.235.23","79.172.26.146","81.88.211.181",
"89.151.140.36","92.50.243.167","91.207.238.44","89.42.138.189","192.168.225.175","95.221.132.142","192.168.1.2",
"89.151.129.97","89.151.158.129","172.25.181.37","83.234.225.249","87.250.210.18","82.114.229.187","81.88.211.181",
"89.169.49.220","89.223.36.153","79.120.84.19","80.65.28.201","89.151.177.19","217.174.52.213","217.174.52.108",
"217.197.113.135","87.255.8.102","88.85.195.21","94.31.171.82",".236.45.212","87.236.45.212","212.92.243.227",
"92.248.153.183","217.66.27.166","94.243.20.133","169.254.204.139","88.85.214.176","77.223.82.190","1.208.80.216",
"81 88 211 181","95.71.80.152","89.151.191.122","89.179.24.105","94.242.149.15","93.157.235.232","95.139.187.250",
"95.30.8.90","212.12.18.4","95.84.34.58","77.223.78.196","77.54.164.148","94.41.163.78","88.85.218.92",
"79.133.131.150","79.133.151.239","92.248.154.11","91.147.51.9","77.120.132.179","92.248.129.254","217.174.54.66",
"89.38.207.202","217.174.54.182","94.41.137.38","91.197.174.69","217.197.112.228",
"463888880","5175475","fathub.zapto.org","pashahub.myftp.org","87.228.84.15","http://united.1hb.ru",
"87.228.39.77","d c h u b://","dchub://","d*c*h*u*b://","d-c-h-u-b://","d/c/h/u/b://","d`c`h`u`b://",
"d!c!h!u!b://","d@c@h@u@b://","d#c#h#u#b://","d$c$h$u$b://","d%c%h%u%b://","d^c^h^u^b://",
"d&c&h&u&b://","d(c(h(u(b://","d)c)h)u)b://","d_c_h_u_b://","d=c=h=u=b://","d+c+h+u+b://","d\c\h\u\b://",
"d?c?h?u?b://","d.c.h.u.b://","d>c>h>u>b://","d,c,h,u,b://","d<c<h<u<b://","d~c~h~u~b://","d№c№h№u№b://",
"d;c;h;u;b://","d:c:h:u:b://","d/c/h/u/b://","d|c|h|u|b://","d]c]h]u]b://","d[c[h[u[b://","d{c{h{u{b://",
"d}c}h}u}b://","d c h u b://"," dchub://","no-ip","mine","sytes","dynip","dyndns","gotdns","kicks-ass","d2g","serveftp",
"servehttp","servehalflife","servequake","servecounterstrike","xs4all","myftp",
"servebeer","zapto","tropico","lysekil","udgnet","dnsalias","dynalias","ath","homeip",
"servemp3","hopto","servegame","staticip","orgdns","myftpsite","ipactive","idlegames",
"homeunix","homelinux","flamenap","dns2go","clanpimp","bounceme","ip","uni","is-a-geek",
"217.117.121.10","91.151.177.64","pozitiff.sytes.net",}
--Список рекламы
sReplace = "Я не рекламлю через MYINFO" --Сообщение, подставляемое вместо описания
tSafeProf = { -- Профили, не проверяемые на рекламу
[0] = true,
[1] = true,
}
--###################################################################################
tTimers = {}
tUsers = {}
function OnStartup()
for i,v in pairs(Core.GetOnlineUsers(true)) do
MyINFOArrival(v,v.sMyInfoString)
end
end
function GetNickListArrival(user,data)
tTimers[TmrMan.AddTimer(iSendTimer, "SendAllInfo")] = user.sNick
end
function MyINFOArrival(user,data)
if not tSafeProf[user.iProfile] then
local str = (data:match("%$MyINFO%s$ALL%s%S+%s(.-)%b<>%$.+$") or data:match("%$MyINFO%s$ALL%s%S+%s(.-)%$.+$")):lower()
tUsers[user.sNick] = nil
for i,v in pairs(tAdv) do
if str:find(v) then
tUsers[user.sNick] = true
break
end
end
end
if tUsers[user.sNick] then
tTimers[TmrMan.AddTimer(iSendTimer, "SendInfo")] = user.sNick
end
end
function SendAllInfo(tmr)
local user = Core.GetUser(tTimers[tmr],true)
if user then
for i,v in pairs(Core.GetOnlineUsers(true)) do
if tUsers[v.sNick] then
Core.SendToUser(user,"$MyINFO $ALL "..v.sNick.." "..sReplace..
(v.sMyInfoString:match("%$MyINFO%s$ALL%s%S+%s.-(%b<>%$.+)$") or
v.sMyInfoString:match("%$MyINFO%s$ALL%s%S+%s.-(%$.+)$")))
end
end
end
tTimers[tmr] = nil
TmrMan.RemoveTimer(tmr)
end
function SendInfo(tmr)
local user = Core.GetUser(tTimers[tmr],true)
if user then
Core.SendToAll("$MyINFO $ALL "..user.sNick.." "..sReplace..
(user.sMyInfoString:match("%$MyINFO%s$ALL%s%S+%s.-(%b<>%$.+)$") or
user.sMyInfoString:match("%$MyINFO%s$ALL%s%S+%s.-(%$.+)$")))
end
tTimers[tmr] = nil
TmrMan.RemoveTimer(tmr)
end