Author Topic: This Bot doesn't work  (Read 5789 times)

0 Members and 1 Guest are viewing this topic.

Offline jackthebest

  • Fulll Member
  • ****
  • Posts: 65
  • Karma: +0/-0
This Bot doesn't work
« on: 25 July, 2004, 15:13:21 »
Code: [Select]

--/ (??.??.->?Alex?<-.??.???)
--/version 0.1 main function added ;)
--/version 0.2 added version commmand
--/version 0.3 added death,version and help command
--/Version 0.4 added fakeshare check
--/version 0.5 added mass message
--/version 0.6 antispaam added
--/version 0.7 fixed little bug in antispam
--/version 0.8 added antiflood
--/version 0.9 added badnick

Bot = "(??.??.->?Alex?<-.??.???)"
version = "0.9"
prefix = "?"

function Main()
frmHub:RegBot(Bot)
end



badShare = { "10000000000","5368709120","10737418240","13630010000","16106127360",
"21474836480","26843545600","27000000000","32212254720","7970010000",
"37580963840","37970010000","6599201000000","65992010000000","36772010000000",
"3677201000000","42949672960","48318382080","214266156265","53687091200",
"59055800320","1747201000000","16772010000000","147720100000000","10240000000000",
"64424509440","65719010000","69793218560","75161927680","80530636800","85899345920",
"91268055040","96636764160","102005473280","102400000000","107374182400","118648471552",
"128849018880","140301549174","161061273600","174720100000","183287729356","214748364800",
"268435456000","322122547200","375809638400","397760100000","429496729600","536870912000",
"657190100000","1024000000000","183287729357","102392020337","13625783747","174719269601",
"65712999629","26993869455","140295106724","21171699199" }

function checkFake(user)
local s, e, shared = strfind(user.sMyInfoString, "$ALL %S+ .-$ $.+.$.-$(%d+)")
return foreachi(badShare, function(id, value) if value == %shared then return id end end)
end
 
function OpConnected(user)
if user.iProfile == 0 then  
user:SendData(Bot,"Ecco "..user.sName.." benvenuto")
SendToAll(Bot,"Un ADMIN ? entrato, un saluto a " ..user.sName)
return 1
end
        if user.iProfile == 1 then
user:SendData(Bot,"Un saluto a "..user.sName.." siamo felici di rivederti ^_^")
SendToAll(Bot,"Un op ? entrato, salutiamo "..user.sName)
return 1
end
if checkFake(user) then user:SendData("*** Sei stato disconesso xke usi un fakeshare client")
user:Disconnect()
end

end
function NewUserConnected(user)
user:SendData(Bot, "weeeeee "..user.sName.." ^_^")
if checkFake(user) then user:SendData("*** Sei stato disconesso xke usi un fakeshare client")
user:TimeBan(20)  
end
end


function DataArrival(user,data)
if strsub(data, 1, 1) == "<" then
data=strsub(data,1,strlen(data)-1)
s,e,cmd = strfind(data,"%b<>%s+(%S+)")
 
elseif cmd == prefix.."version" then
user:SendData(Bot,"Questo bot e giunto alla versione: "..version)
return 1

elseif cmd == prefix.."help" then
user:SendData(Bot,"?help Mostra queste help   ?killme autodisconetiti dal hub ?mass manda un mass message")
return 1

elseif cmd == prefix.."killme" then
user:Disconnect()
SendToAll(Bot,user.sName.." Si e auto disconesso :D")
return 1
elseif cmd== prefix.."massmsg" then
if user.bOperator then
s,e,cmd,message = strfind(data,"%s+(%S+)%s+(.*)")
if message == nil then
user:SendData(Bot,"Scrivi !massmsg ")
else
SendPmToAll(Bot," "..user.sName..": "..message)
end
end



end

end




PMCount = {}
MainCount = {}
MaxPM = 30 --/ max  15 parole al secondo in pvt se no ban
MaxMain = 20 --/ max 15 parole al secondo in main se no
timeslice = 10*1000 -- 15 seconds

trigs = {
["myftpsite"]=1,["dns2go"]=2,["ip.com"]=3,["staticip"]=4,["ipactive"]=5,["ip.org"]=6,["ip.biz"]=7,["dynip.com"]=8,["d2g.com"]=9,["dyndns.org"]=10,["dynu.com"]=11,["mine.org"]=12,["kick-ass.net"]=13,["darkdata.net"]=14,["ipme.net"]=15,["udgnet.com"]=16,["sytes.net"]=17,["d2g.biz"]=18,["homeip.net"]=19,["mine.nu"]=20,["depecheconnect.com"]=21,["e-net.lv"]=22,["newgnr.com"]=23,["serveftp.com"]=24,["evildc.com"]=25,["bst.net"]=26,["bsd.net"]=27,["ods.org"]=28,["dnsalias.org"]=29,["x-host.net"]=30,["x-host.org"]=31,["bounceme.net"]=32,["myvnc.com"]=33,["sytes.net"]=34,["xs4all.net"]=35,["xs4all.nl"]=36,["kyed.com"]=37,["lir.dk"]=38,["finx.org"]=39,["ath.cx"]=40,["sheckie.net"]=41,["vizvaz.net"]=42,["servebeer.com"]=43,["snygging.net"]=44,["kicks-ass.com"]=45,["nerdcamp.net"]=46,["gotdns.org"]=47,["homeip.net"]=48,["cicileu.org"]=49,["cicileu.com"]=50,["3utilities.com"]=51,["bounceme.net"]=52,["myftp.biz"]=53,["myftp.org"]=54,["myvnc.com"]=55,["no-ip.biz"]=56,["no-ip.com"]=57,["no-ip.info"]=58,["no-ip.org"]=59,["redirectme.net"]=60,["servebeer.com"]=61,["servecounterstrike.com"]=62,["serveftp.com"]=63,["servegame.com"]=64,["servehalflife.com"]=65,["servehttp.com"]=66,["serveirc.com"]=67,["servemp3.com"]=68,["servepics.com"]=69,["servequake.com"]=70,["sytes.net"]=71,["zapto.org"]=72,["ciscofreak.com"]=73,["damnserver.com"]=74,["ditchyourip.com"]=75,["dnsiskinky.com"]=76,["geekgalaxy.com"]=77,["net-freaks.com"]=78,["no-ip.ca"]=79,["no-ip.co.uk"]=80,["no-ip.net"]=81,["point2this.com"]=82,["securityexploits.com"]=83,["securitytactics.com"]=84,["servehumour.com"]=85,["servep2p.com"]=86,["servesarcasm.com"]=87,["stufftoread.com"]=88,["unusualperson.com"]=89,["workisboring.com"]=90,["hopto"]=91,["dnsalias.net"]=92
}

function Main()
frmHub:RegBot(Bot)
end

function DataArrival(user, data)
if (not user.bOperator) then
if (( strsub(data, 1, 1) == "<" ) or ( strsub(data, 1, 4) == "$To:" )) then
for key,a in trigs do
if( strfind( strlower(data), key) ) then
SendToAll( botname, user.sName.." kikkato per spamming" )
user:Disconnect()
end
end
end
end
end







PMCount = {}
MainCount = {}
MaxPM = 30 --/ max 15 parole/s in pvt se + causano il ban
MaxMain = 20 --/ max 15 parole/s al secondo in main se + causano il ban
timeslice = 10*1000 -- 15 seconds

function Main()
frmHub:RegBot(Bot)
SetTimer(timeslice)
StartTimer()
end

function DataArrival(curUser, sData)
if strfind(sData,"$To:") then
if PMCount[curUser.sIP] ~= nil then
PMCount[curUser.sIP] = PMCount[curUser.sIP] +1
--SendToAll("----",PMCount[curUser.sIP])

if PMCount[curUser.sIP] > MaxPM then
FloodDetected (curUser, sData)
PMCount[curUser.sIP] = -100
end
else
PMCount[curUser.sIP] = 1
end
elseif strfind(sData,curUser.sName,1,plain) == 2 then
if MainCount[curUser.sIP] ~= nil then
MainCount[curUser.sIP] = MainCount[curUser.sIP] +1
--SendToAll("----",PMCount[curUser.sIP])
if MainCount[curUser.sIP] > MaxMain then
FloodDetected (curUser, sData)
MainCount[curUser.sIP] = -100
end
else
MainCount[curUser.sIP] = 1
end
end
end

function OnTimer()
--for k,v in PMCount do
--SendToAll("---------",k.."\t"..v)
--end
PMCount = {}
MainCount = {}
end

function FloodDetected (curUser,sData)
SendToAll ("# "..Bot.. "WARING--> "..name .. " floddava ed e stato bannnato.")
curUser:Ban()
curUser:Disconnect()
end

arrBadNick = {
"[OP]","(op)","[admin]","(admin)","[su]","(su)","[master]",
"(master)","[moderator]","(moderator)","[adm]","(adm)","[administrator]","(administrator)",
"[fc]","(fc)","[operator]","(operator)"
}

function Main()
frmHub:RegBot(Bot)
SetTimer(150*6000)
StartTimer()
end

function OnTimer()
randomtimer = random(3)
if randomtimer == 1 then
SendToAll(Bot,"---------------------------------------------")
SendToAll(Bot,"----write /fav-----")
SendToAll(Bot,"---------------------------------------------")
elseif randomtimer == 2 then
SendToAll(Bot,"----------------------------------------------------------------------------------------------")
SendToAll(Bot,"-----------(??.??.->?Alex?<-.??.???) write fav----------- ")
SendToAll(Bot,"----------------------------------------------------------------------------------------------")
elseif randomtimer == 3 then
SendToAll(Bot,"                                        //                          ")                    
SendToAll(Bot,"                                  ( 0-0 )                          ")              
SendToAll(Bot," -------------------oOO--------(_)---------------------------------")
SendToAll(Bot,"     write /fav                ")
                SendToAll(Bot,"------------------------------------oOO----------------------------- ")
SendToAll(Bot,"                                 I__I__I                            ")
SendToAll(Bot,"                                     I I I I                         ")
                SendToAll(Bot,"                                ooO Ooo                            ")                

end
end

function NewUserConnected(user)
for i=1, getn(arrBadNick) do
if (strlen(user.sName) >= strlen(arrBadNick[i])) then
if (strsub(strlower(user.sName),1,strlen(arrBadNick[i])) == strlower(arrBadNick[i])) then
user:SendData(Bot, "Stai usando un prefisso o un nick non consentito.")
user:SendData(Bot, "Non usare "..arrBadNick[i].." nel tuo nick")
user:Disconnect()
end
end
end
end




THX to nerbos for the fakecheck and badnik  :D
THX to patthy and her lesson  :D


This is my first bot but ... it don't work ...
Help me  ;(
« Last Edit: 25 July, 2004, 15:29:39 by jackthebest »

PtokaX forum

This Bot doesn't work
« on: 25 July, 2004, 15:13:21 »

Offline jackthebest

  • Fulll Member
  • ****
  • Posts: 65
  • Karma: +0/-0
(No subject)
« Reply #1 on: 25 July, 2004, 15:31:59 »
Quote
Originally posted by Mutor
You have to uncheck

[ ]  Deactivate smilies in this post.

below, otherwise the script is unreadable.
Fix up your post so we can have a looksee at the script.
sorry  :rolleyes:

Offline kepp

  • Scripter
  • King
  • ******
  • Posts: 790
  • Karma: +2/-0
(No subject)
« Reply #2 on: 25 July, 2004, 15:54:55 »
I must say im quite impressed about the width :-O

hmm, you use 2 DataArrivals
2 NewUserConnected functions..

try to clean that up first.. And see what happens :)
Guarding    

Offline jackthebest

  • Fulll Member
  • ****
  • Posts: 65
  • Karma: +0/-0
(No subject)
« Reply #3 on: 25 July, 2004, 16:53:37 »
Quote
Originally posted by kepp
I must say im quite impressed about the width :-O

hmm, you use 2 DataArrivals
2 NewUserConnected functions..

try to clean that up first.. And see what happens :)


THX

ehm.. there are 3 DataArrivals... but the 3rd  can't clean for the second timer.  i'm sorry for my bad english  ;(

Help me
Code: [Select]

--/ (??.??.->?Alex?<-.??.???)
--/version 0.1 main function added ;)
--/version 0.2 added version commmand
--/version 0.3 added death,version and help command
--/Version 0.4 added fakeshare check
--/version 0.5 added mass message
--/version 0.6 antispaam added
--/version 0.7 fixed little bug in antispam
--/version 0.8 added antiflood
--/version 0.9 added badnick

Bot = "(??.??.->?Alex?<-.??.???)"
version = "0.9"
prefix = "!"

trigs = {
["myftpsite"]=1,["dns2go"]=2,["ip.com"]=3,["staticip"]=4,["ipactive"]=5,["ip.org"]=6,["ip.biz"]=7,["dynip.com"]=8,["d2g.com"]=9,["dyndns.org"]=10,["dynu.com"]=11,["mine.org"]=12,["kick-ass.net"]=13,["darkdata.net"]=14,["ipme.net"]=15,["udgnet.com"]=16,["sytes.net"]=17,["d2g.biz"]=18,["homeip.net"]=19,["mine.nu"]=20,["depecheconnect.com"]=21,["e-net.lv"]=22,["newgnr.com"]=23,["serveftp.com"]=24,["evildc.com"]=25,["bst.net"]=26,["bsd.net"]=27,["ods.org"]=28,["dnsalias.org"]=29,["x-host.net"]=30,["x-host.org"]=31,["bounceme.net"]=32,["myvnc.com"]=33,["sytes.net"]=34,["xs4all.net"]=35,["xs4all.nl"]=36,["kyed.com"]=37,["lir.dk"]=38,["finx.org"]=39,["ath.cx"]=40,["sheckie.net"]=41,["vizvaz.net"]=42,["servebeer.com"]=43,["snygging.net"]=44,["kicks-ass.com"]=45,["nerdcamp.net"]=46,["gotdns.org"]=47,["homeip.net"]=48,["cicileu.org"]=49,["cicileu.com"]=50,["3utilities.com"]=51,["bounceme.net"]=52,["myftp.biz"]=53,["myftp.org"]=54,["myvnc.com"]=55,["no-ip.biz"]=56,["no-ip.com"]=57,["no-ip.info"]=58,["no-ip.org"]=59,["redirectme.net"]=60,["servebeer.com"]=61,["servecounterstrike.com"]=62,["serveftp.com"]=63,["servegame.com"]=64,["servehalflife.com"]=65,["servehttp.com"]=66,["serveirc.com"]=67,["servemp3.com"]=68,["servepics.com"]=69,["servequake.com"]=70,["sytes.net"]=71,["zapto.org"]=72,["ciscofreak.com"]=73,["damnserver.com"]=74,["ditchyourip.com"]=75,["dnsiskinky.com"]=76,["geekgalaxy.com"]=77,["net-freaks.com"]=78,["no-ip.ca"]=79,["no-ip.co.uk"]=80,["no-ip.net"]=81,["point2this.com"]=82,["securityexploits.com"]=83,["securitytactics.com"]=84,["servehumour.com"]=85,["servep2p.com"]=86,["servesarcasm.com"]=87,["stufftoread.com"]=88,["unusualperson.com"]=89,["workisboring.com"]=90,["hopto"]=91,["dnsalias.net"]=92
}


arrBadNick = {
"[OP]","(op)","[admin]","(admin)","[su]","(su)","[master]",
"(master)","[moderator]","(moderator)","[adm]","(adm)","[administrator]","(administrator)",
"[fc]","(fc)","[operator]","(operator)"
}

function Main()
frmHub:RegBot(Bot)
end



badShare = { "10000000000","5368709120","10737418240","13630010000","16106127360",
"21474836480","26843545600","27000000000","32212254720","7970010000",
"37580963840","37970010000","6599201000000","65992010000000","36772010000000",
"3677201000000","42949672960","48318382080","214266156265","53687091200",
"59055800320","1747201000000","16772010000000","147720100000000","10240000000000",
"64424509440","65719010000","69793218560","75161927680","80530636800","85899345920",
"91268055040","96636764160","102005473280","102400000000","107374182400","118648471552",
"128849018880","140301549174","161061273600","174720100000","183287729356","214748364800",
"268435456000","322122547200","375809638400","397760100000","429496729600","536870912000",
"657190100000","1024000000000","183287729357","102392020337","13625783747","174719269601",
"65712999629","26993869455","140295106724","21171699199" }

function checkFake(user)
local s, e, shared = strfind(user.sMyInfoString, "$ALL %S+ .-$ $.+.$.-$(%d+)")
return foreachi(badShare, function(id, value) if value == %shared then return id end end)
end
 
function OpConnected(user)
if user.iProfile == 0 then  
user:SendData(Bot,"Ecco "..user.sName.." benvenuto")
SendToAll(Bot,"Un ADMIN ? entrato, un saluto a " ..user.sName)
return 1
end
        if user.iProfile == 1 then
user:SendData(Bot,"Un saluto a "..user.sName.." siamo felici di rivederti ^_^")
SendToAll(Bot,"Un op ? entrato, salutiamo "..user.sName)
return 1
end
if checkFake(user) then user:SendData("*** Sei stato disconesso xke usi un fakeshare client")
user:Disconnect()
end

end
function NewUserConnected(user)
user:SendData(Bot, "weeeeee "..user.sName.." ^_^")
if checkFake(user) then user:SendData("*** Sei stato disconesso xke usi un fakeshare client")
user:TimeBan(20)  
end
for i=1, getn(arrBadNick) do
if (strlen(user.sName) >= strlen(arrBadNick[i])) then
if (strsub(strlower(user.sName),1,strlen(arrBadNick[i])) == strlower(arrBadNick[i])) then
user:SendData(Bot, "Stai usando un prefisso o un nick non consentito.")
user:SendData(Bot, "Non usare "..arrBadNick[i].." nel tuo nick")
user:Disconnect()
end
end
end

end

function DataArrival(user,data)
if strsub(data, 1, 1) == "<" then
data=strsub(data,1,strlen(data)-1)
s,e,cmd = strfind(data,"%b<>%s+(%S+)")
 
elseif cmd == prefix.."version" then
user:SendData(Bot,"Questo bot e giunto alla versione: "..version)
return 1

elseif cmd == prefix.."help" then
user:SendData(Bot,"?help Mostra queste help   ?killme autodisconetiti dal hub ?mass manda un mass message")
return 1

elseif cmd == prefix.."killme" then
user:Disconnect()
SendToAll(Bot,user.sName.." Si e auto disconesso :D")
return 1
elseif cmd== prefix.."massmsg" then
if user.bOperator then
s,e,cmd,message = strfind(data,"%s+(%S+)%s+(.*)")
if message == nil then
user:SendData(Bot,"Scrivi !massmsg ")
else
SendPmToAll(Bot," "..user.sName..": "..message)
end
end



end
if (not user.bOperator) then
if (( strsub(data, 1, 1) == "<" ) or ( strsub(data, 1, 4) == "$To:" )) then
for key,a in trigs do
if( strfind( strlower(data), key) ) then
SendToAll( botname, user.sName.." kikkato per spamming" )
user:Disconnect()
end
end
end
end
end



PMCount = {}
MainCount = {}
MaxPM = 30 --/ max 15 parole/s in pvt se + causano il ban
MaxMain = 20 --/ max 15 parole/s al secondo in main se + causano il ban
timeslice = 10*1000 -- 15 seconds

function Main()
frmHub:RegBot(Bot)
SetTimer(timeslice)
StartTimer()
end

function DataArrival(curUser, sData)
if strfind(sData,"$To:") then
if PMCount[curUser.sIP] ~= nil then
PMCount[curUser.sIP] = PMCount[curUser.sIP] +1
--SendToAll("----",PMCount[curUser.sIP])

if PMCount[curUser.sIP] > MaxPM then
FloodDetected (curUser, sData)
PMCount[curUser.sIP] = -100
end
else
PMCount[curUser.sIP] = 1
end
elseif strfind(sData,curUser.sName,1,plain) == 2 then
if MainCount[curUser.sIP] ~= nil then
MainCount[curUser.sIP] = MainCount[curUser.sIP] +1
--SendToAll("----",PMCount[curUser.sIP])
if MainCount[curUser.sIP] > MaxMain then
FloodDetected (curUser, sData)
MainCount[curUser.sIP] = -100
end
else
MainCount[curUser.sIP] = 1
end
end
end

function OnTimer()
--for k,v in PMCount do
--SendToAll("---------",k.."\t"..v)
--end
PMCount = {}
MainCount = {}
end

function FloodDetected (curUser,sData)
SendToAll ("# "..Bot.. "WARING--> "..name .. " floddava ed e stato bannnato.")
curUser:Ban()
curUser:Disconnect()
end



function Main()
frmHub:RegBot(Bot)
SetTimer(150*6000)
StartTimer()
end

function OnTimer()
randomtimer = random(3)
if randomtimer == 1 then
SendToAll(Bot,"---------------------------------------------")
SendToAll(Bot,"----created by jackthebest-----")
SendToAll(Bot,"---------------------------------------------")
elseif randomtimer == 2 then
SendToAll(Bot,"----------------------------------------------------------------------------------------------")
SendToAll(Bot,"-----------(??.??.->?Alex?<-.??.???) written by jackthebest----------- ")
SendToAll(Bot,"----------------------------------------------------------------------------------------------")
elseif randomtimer == 3 then
SendToAll(Bot,"                                        //                          ")                    
SendToAll(Bot,"                                  ( 0-0 )                          ")              
SendToAll(Bot," -------------------oOO--------(_)---------------------------------")
SendToAll(Bot,"            BOT creato da jackthebest                ")
                SendToAll(Bot,"------------------------------------oOO----------------------------- ")
SendToAll(Bot,"                                 I__I__I                            ")
SendToAll(Bot,"                                     I I I I                         ")
                SendToAll(Bot,"                                ooO Ooo                            ")                

end
end






it doesn't work!  ;(

Offline jackthebest

  • Fulll Member
  • ****
  • Posts: 65
  • Karma: +0/-0
(No subject)
« Reply #4 on: 25 July, 2004, 17:15:01 »
--/version 0.1 main function added ;)  <--- it work   :D
--/version 0.2 added version commmand <--- it doesn't work  ;(
 --/version 0.3 added death and help command <--- it doesn't work  ;(
--/Version 0.4 added fakeshare check<--- it work   :D
--/version 0.5 added mass message<--- it doesn't work  ;(
--/version 0.6 antispaam added<--- it work   :D
--/version 0.7 fixed little bug in antispam<--- it work   :D
--/version 0.8 added antiflood<--- it work   :D
--/version 0.9 added badnick<--- it work   :D

Offline kepp

  • Scripter
  • King
  • ******
  • Posts: 790
  • Karma: +2/-0
(No subject)
« Reply #5 on: 25 July, 2004, 21:54:43 »
A quik cleanup...
Code: [Select]
--/ (??.??.->?Alex?<-.??.???)
--/version 0.1 main function added ;)
--/version 0.2 added version commmand
--/version 0.3 added death,version and help command
--/Version 0.4 added fakeshare check
--/version 0.5 added mass message
--/version 0.6 antispaam added
--/version 0.7 fixed little bug in antispam
--/version 0.8 added antiflood
--/version 0.9 added badnick

--// Time variables
sec = 1000
min = 60 * sec
hour = 60 * min

Bot = "(??.??.->?Alex?<-.??.???)"
version = "0.9"
prefix = "!"
PMCount = {}
MainCount = {}
MaxPM = 30 --/ max 15 parole/s in pvt se + causano il ban
MaxMain = 20 --/ max 15 parole/s al secondo in main se + causano il ban
timeslice = min

tmrCntrl = 0

trigs = {
["myftpsite"]=1,["dns2go"]=2,["ip.com"]=3,["staticip"]=4,["ipactive"]=5,["ip.org"]=6,["ip.biz"]=7,["dynip.com"]=8,["d2g.com"]=9,["dyndns.org"]=10,["dynu.com"]=11,["mine.org"]=12,["kick-ass.net"]=13,["darkdata.net"]=14,["ipme.net"]=15,["udgnet.com"]=16,["sytes.net"]=17,["d2g.biz"]=18,["homeip.net"]=19,["mine.nu"]=20,["depecheconnect.com"]=21,["e-net.lv"]=22,["newgnr.com"]=23,["serveftp.com"]=24,["evildc.com"]=25,["bst.net"]=26,["bsd.net"]=27,["ods.org"]=28,["dnsalias.org"]=29,["x-host.net"]=30,["x-host.org"]=31,["bounceme.net"]=32,["myvnc.com"]=33,["sytes.net"]=34,["xs4all.net"]=35,["xs4all.nl"]=36,["kyed.com"]=37,["lir.dk"]=38,["finx.org"]=39,["ath.cx"]=40,["sheckie.net"]=41,["vizvaz.net"]=42,["servebeer.com"]=43,["snygging.net"]=44,["kicks-ass.com"]=45,["nerdcamp.net"]=46,["gotdns.org"]=47,["homeip.net"]=48,["cicileu.org"]=49,["cicileu.com"]=50,["3utilities.com"]=51,["bounceme.net"]=52,["myftp.biz"]=53,["myftp.org"]=54,["myvnc.com"]=55,["no-ip.biz"]=56,["no-ip.com"]=57,["no-ip.info"]=58,["no-ip.org"]=59,["redirectme.net"]=60,["servebeer.com"]=61,["servecounterstrike.com"]=62,["serveftp.com"]=63,["servegame.com"]=64,["servehalflife.com"]=65,["servehttp.com"]=66,["serveirc.com"]=67,["servemp3.com"]=68,["servepics.com"]=69,["servequake.com"]=70,["sytes.net"]=71,["zapto.org"]=72,["ciscofreak.com"]=73,["damnserver.com"]=74,["ditchyourip.com"]=75,["dnsiskinky.com"]=76,["geekgalaxy.com"]=77,["net-freaks.com"]=78,["no-ip.ca"]=79,["no-ip.co.uk"]=80,["no-ip.net"]=81,["point2this.com"]=82,["securityexploits.com"]=83,["securitytactics.com"]=84,["servehumour.com"]=85,["servep2p.com"]=86,["servesarcasm.com"]=87,["stufftoread.com"]=88,["unusualperson.com"]=89,["workisboring.com"]=90,["hopto"]=91,["dnsalias.net"]=92
}


arrBadNick = {
"[OP]","(op)","[admin]","(admin)","[su]","(su)","[master]",
"(master)","[moderator]","(moderator)","[adm]","(adm)","[administrator]","(administrator)",
"[fc]","(fc)","[operator]","(operator)" }

badShare = { "10000000000","5368709120","10737418240","13630010000","16106127360",
   "21474836480","26843545600","27000000000","32212254720","7970010000",
   "37580963840","37970010000","6599201000000","65992010000000","36772010000000",
   "3677201000000","42949672960","48318382080","214266156265","53687091200",
   "59055800320","1747201000000","16772010000000","147720100000000","10240000000000",
   "64424509440","65719010000","69793218560","75161927680","80530636800","85899345920",
   "91268055040","96636764160","102005473280","102400000000","107374182400","118648471552",
   "128849018880","140301549174","161061273600","174720100000","183287729356","214748364800",
   "268435456000","322122547200","375809638400","397760100000","429496729600","536870912000",
   "657190100000","1024000000000","183287729357","102392020337","13625783747","174719269601",
   "65712999629","26993869455","140295106724","21171699199" }

function Main()
frmHub:RegBot(Bot)
SetTimer(timeslice)
StartTimer()
end

function NewUserConnected(user)
   user:SendData(Bot, "weeeeee "..user.sName.." ^_^")
if checkFake(user) then
      user:SendData("*** Sei stato disconesso xke usi un fakeshare client")
user:TimeBan(20)  
end
for i=1, getn(arrBadNick) do
if (strlen(user.sName) >= strlen(arrBadNick[i])) then
if (strsub(strlower(user.sName),1,strlen(arrBadNick[i])) == strlower(arrBadNick[i])) then
user:SendData(Bot, "Stai usando un prefisso o un nick non consentito.")
user:SendData(Bot, "Non usare "..arrBadNick[i].." nel tuo nick")
user:Disconnect()
end
end
end
end

function OpConnected(user)
   if user.iProfile == 0 then  
user:SendData(Bot,"Ecco "..user.sName.." benvenuto")
SendToAll(Bot,"Un ADMIN ? entrato, un saluto a " ..user.sName)
   elseif user.iProfile == 1 then
      user:SendData(Bot,"Un saluto a "..user.sName.." siamo felici di rivederti ^_^")
      SendToAll(Bot,"Un op ? entrato, salutiamo "..user.sName)
end
if checkFake(user) then user:SendData("*** Sei stato disconesso xke usi un fakeshare client")
user:Disconnect()
end
end

function DataArrival(user,data)
   if strsub(data, 1, 1) == "<" then
      data=strsub(data,1,strlen(data)-1)
      s,e,cmd = strfind(data,"%b<>%s+(%S+)")

      if MainCount[user.sIP] ~= nil then
         MainCount[user.sIP] = MainCount[user.sIP] + 1
      elseif MainCount[user.sIP] > tonumber(MaxMain) then
         SendToAll ("# "..Bot.. "WARING--> "..user.sName .. " floddava ed e stato bannnato.")
         user:Ban()
         user:Disconnect()
      else
         MainCount[user.sIP] = 1
      end
if cmd == prefix.."version" then
user:SendData(Bot,"Questo bot e giunto alla versione: "..version)
         return 1

elseif cmd == prefix.."help" then
user:SendData(Bot,"?help Mostra queste help   ?killme autodisconetiti dal hub ?mass manda un mass message")
         return 1

elseif cmd == prefix.."killme" then
user:Disconnect()
SendToAll(Bot,user.sName.." Si e auto disconesso :D")
         return 1

elseif cmd== prefix.."massmsg" then
         if user.bOperator then
            s,e,cmd,message = strfind(data,"%s+(%S+)%s+(.*)")
            if message == nil then
               user:SendData(Bot,"Scrivi !massmsg ")
            else
               SendPmToAll(Bot," "..user.sName..": "..message)
            end
         end
      end
   end
   if (( strsub(data, 1, 1) == "<" ) or ( strsub(data, 1, 4) == "$To:" )) then
      if not user bOperator then
         for key,a in trigs do
            if( strfind( strlower(data), key) ) then
               SendToAll( botname, user.sName.." kikkato per spamming" )
               user:Disconnect()
            end
         end
end
end
   if (( strsub(data,1,4) == "$To:" )) then
      if PMCount[user.sIP] ~= nil then
         PMCount[user.sIP] = PMCount[user.sIP] +1
      elseif PMCount[user.sIP] > tonumber(MaxPM) then
         SendToAll ("# "..Bot.. "WARING--> "..user.sName .. " floddava ed e stato bannnato.")
         user:Ban()
         user:Disconnect()
      else
         PMCount[user.sIP] = 1
      end
   end
end

function OnTimer()
   if tmrCntrl == 40 then
      randomtimer = random(3)
      if randomtimer == 1 then
         SendToAll(Bot,"---------------------------------------------")
         SendToAll(Bot,"----created by jackthebest-----")
         SendToAll(Bot,"---------------------------------------------")
      elseif randomtimer == 2 then
         SendToAll(Bot,"----------------------------------------------------------------------------------------------")
         SendToAll(Bot,"-----------(??.??.->?Alex?<-.??.???) written by jackthebest----------- ")
         SendToAll(Bot,"----------------------------------------------------------------------------------------------")
      elseif randomtimer == 3 then
         SendToAll(Bot,"                                        //                          ")                    
         SendToAll(Bot,"                                  ( 0-0 )                          ")              
         SendToAll(Bot," -------------------oOO--------(_)---------------------------------")
         SendToAll(Bot,"            BOT creato da jackthebest                ")
         SendToAll(Bot,"------------------------------------oOO----------------------------- ")
         SendToAll(Bot,"                                 I__I__I                            ")
         SendToAll(Bot,"                                     I I I I                         ")
         SendToAll(Bot,"                                ooO Ooo                            ")      
         tmrCntrl = 0
      end
   else
      tmrCntrl = tmrCntrl + 1
   end
end

function checkFake(user)
   local s, e, shared = strfind(user.sMyInfoString, "$ALL %S+ .-$ $.+.$.-$(%d+)")
   return foreachi(badShare, function(id, value) if value == %shared then return id end end)
end
Guarding    

Offline Psycho_Chihuahua

  • Systemspecialist IT
  • Emperor
  • **
  • Posts: 1 054
  • Karma: +112/-1
  • I am wherever i want to be
    • PtokaX Luaboard
(No subject)
« Reply #6 on: 25 July, 2004, 22:02:53 »
Testdrive 4 shows:
Code: [Select]
Syntax Error: `then' expected;|  last token read: `bOperator' at line 125
Try this:
Code: [Select]
--/ (??.??.->?Alex?<-.??.???)
--/version 0.1 main function added ;)
--/version 0.2 added version commmand
--/version 0.3 added death,version and help command
--/Version 0.4 added fakeshare check
--/version 0.5 added mass message
--/version 0.6 antispaam added
--/version 0.7 fixed little bug in antispam
--/version 0.8 added antiflood
--/version 0.9 added badnick

--// Time variables
sec = 1000
min = 60 * sec
hour = 60 * min

Bot = "(??.??.->?Alex?<-.??.???)"
version = "0.9"
prefix = "!"
PMCount = {}
MainCount = {}
MaxPM = 30 --/ max 15 parole/s in pvt se + causano il ban
MaxMain = 20 --/ max 15 parole/s al secondo in main se + causano il ban
timeslice = min

tmrCntrl = 0

trigs = {
["myftpsite"]=1,["dns2go"]=2,["ip.com"]=3,["staticip"]=4,["ipactive"]=5,["ip.org"]=6,["ip.biz"]=7,["dynip.com"]=8,["d2g.com"]

=9,["dyndns.org"]=10,["dynu.com"]=11,["mine.org"]=12,["kick-ass.net"]=13,["darkdata.net"]=14,["ipme.net"]=15,["udgnet.co

m"]=16,["sytes.net"]=17,["d2g.biz"]=18,["homeip.net"]=19,["mine.nu"]=20,["depecheconnect.com"]=21,["e-net.lv"]=22,["ne

wgnr.com"]=23,["serveftp.com"]=24,["evildc.com"]=25,["bst.net"]=26,["bsd.net"]=27,["ods.org"]=28,["dnsalias.org"]=29,["x-h

ost.net"]=30,["x-host.org"]=31,["bounceme.net"]=32,["myvnc.com"]=33,["sytes.net"]=34,["xs4all.net"]=35,["xs4all.nl"]=36,["

kyed.com"]=37,["lir.dk"]=38,["finx.org"]=39,["ath.cx"]=40,["sheckie.net"]=41,["vizvaz.net"]=42,["servebeer.com"]=43,["snyggi

ng.net"]=44,["kicks-ass.com"]=45,["nerdcamp.net"]=46,["gotdns.org"]=47,["homeip.net"]=48,["cicileu.org"]=49,["cicileu.com"]

=50,["3utilities.com"]=51,["bounceme.net"]=52,["myftp.biz"]=53,["myftp.org"]=54,["myvnc.com"]=55,["no-ip.biz"]=56,["no-ip.

com"]=57,["no-ip.info"]=58,["no-ip.org"]=59,["redirectme.net"]=60,["servebeer.com"]=61,["servecounterstrike.com"]=62,["ser

veftp.com"]=63,["servegame.com"]=64,["servehalflife.com"]=65,["servehttp.com"]=66,["serveirc.com"]=67,["servemp3.com"]=

68,["servepics.com"]=69,["servequake.com"]=70,["sytes.net"]=71,["zapto.org"]=72,["ciscofreak.com"]=73,["damnserver.com"]

=74,["ditchyourip.com"]=75,["dnsiskinky.com"]=76,["geekgalaxy.com"]=77,["net-freaks.com"]=78,["no-ip.ca"]=79,["no-ip.co.uk

"]=80,["no-ip.net"]=81,["point2this.com"]=82,["securityexploits.com"]=83,["securitytactics.com"]=84,["servehumour.com"]=85,

["servep2p.com"]=86,["servesarcasm.com"]=87,["stufftoread.com"]=88,["unusualperson.com"]=89,["workisboring.com"]=90,["h

opto"]=91,["dnsalias.net"]=92
}


arrBadNick = {
"[OP]","(op)","[admin]","(admin)","[su]","(su)","[master]",
"(master)","[moderator]","(moderator)","[adm]","(adm)","[administrator]","(administrator)",
"[fc]","(fc)","[operator]","(operator)" }

badShare = { "10000000000","5368709120","10737418240","13630010000","16106127360",
   "21474836480","26843545600","27000000000","32212254720","7970010000",
   "37580963840","37970010000","6599201000000","65992010000000","36772010000000",
   "3677201000000","42949672960","48318382080","214266156265","53687091200",
   "59055800320","1747201000000","16772010000000","147720100000000","10240000000000",
   "64424509440","65719010000","69793218560","75161927680","80530636800","85899345920",
   "91268055040","96636764160","102005473280","102400000000","107374182400","118648471552",
   "128849018880","140301549174","161061273600","174720100000","183287729356","214748364800",
   "268435456000","322122547200","375809638400","397760100000","429496729600","536870912000",
   "657190100000","1024000000000","183287729357","102392020337","13625783747","174719269601",
   "65712999629","26993869455","140295106724","21171699199" }

function Main()
frmHub:RegBot(Bot)
SetTimer(timeslice)
StartTimer()
end

function NewUserConnected(user)
   user:SendData(Bot, "weeeeee "..user.sName.." ^_^")
if checkFake(user) then
      user:SendData("*** Sei stato disconesso xke usi un fakeshare client")
user:TimeBan(20)  
end
for i=1, getn(arrBadNick) do
if (strlen(user.sName) >= strlen(arrBadNick[i])) then
if (strsub(strlower(user.sName),1,strlen(arrBadNick[i])) == strlower(arrBadNick[i])) then
user:SendData(Bot, "Stai usando un prefisso o un nick non consentito.")
user:SendData(Bot, "Non usare "..arrBadNick[i].." nel tuo nick")
user:Disconnect()
end
end
end
end

function OpConnected(user)
   if user.iProfile == 0 then  
user:SendData(Bot,"Ecco "..user.sName.." benvenuto")
SendToAll(Bot,"Un ADMIN ? entrato, un saluto a " ..user.sName)
   elseif user.iProfile == 1 then
      user:SendData(Bot,"Un saluto a "..user.sName.." siamo felici di rivederti ^_^")
      SendToAll(Bot,"Un op ? entrato, salutiamo "..user.sName)
end
if checkFake(user) then user:SendData("*** Sei stato disconesso xke usi un fakeshare client")
user:Disconnect()
end
end

function DataArrival(user,data)
   if strsub(data, 1, 1) == "<" then
      data=strsub(data,1,strlen(data)-1)
      s,e,cmd = strfind(data,"%b<>%s+(%S+)")

      if MainCount[user.sIP] ~= nil then
         MainCount[user.sIP] = MainCount[user.sIP] + 1
      elseif MainCount[user.sIP] > tonumber(MaxMain) then
         SendToAll ("# "..Bot.. "WARING--> "..user.sName .. " floddava ed e stato bannnato.")
         user:Ban()
         user:Disconnect()
      else
         MainCount[user.sIP] = 1
      end
if cmd == prefix.."version" then
user:SendData(Bot,"Questo bot e giunto alla versione: "..version)
         return 1

elseif cmd == prefix.."help" then
user:SendData(Bot,"?help Mostra queste help   ?killme autodisconetiti dal hub ?mass manda un

mass message")
         return 1

elseif cmd == prefix.."killme" then
user:Disconnect()
SendToAll(Bot,user.sName.." Si e auto disconesso :D")
         return 1

elseif cmd== prefix.."massmsg" then
         if user.bOperator then
            s,e,cmd,message = strfind(data,"%s+(%S+)%s+(.*)")
            if message == nil then
               user:SendData(Bot,"Scrivi !massmsg ")
            else
               SendPmToAll(Bot," "..user.sName..": "..message)
            end
         end
      end
   end
   if (( strsub(data, 1, 1) == "<" ) or ( strsub(data, 1, 4) == "$To:" )) then
      if not user.bOperator then
         for key,a in trigs do
            if( strfind( strlower(data), key) ) then
               SendToAll( botname, user.sName.." kikkato per spamming" )
               user:Disconnect()
            end
         end
end
end
   if (( strsub(data,1,4) == "$To:" )) then
      if PMCount[user.sIP] ~= nil then
         PMCount[user.sIP] = PMCount[user.sIP] +1
      elseif PMCount[user.sIP] > tonumber(MaxPM) then
         SendToAll ("# "..Bot.. "WARING--> "..user.sName .. " floddava ed e stato bannnato.")
         user:Ban()
         user:Disconnect()
      else
         PMCount[user.sIP] = 1
      end
   end
end

function OnTimer()
   if tmrCntrl == 40 then
      randomtimer = random(3)
      if randomtimer == 1 then
         SendToAll(Bot,"---------------------------------------------")
         SendToAll(Bot,"----created by jackthebest-----")
         SendToAll(Bot,"---------------------------------------------")
      elseif randomtimer == 2 then
         SendToAll(Bot,"----------------------------------------------------------------------------------------------")
         SendToAll(Bot,"-----------(??.??.->?Alex?<-.??.???) written by jackthebest----------- ")
         SendToAll(Bot,"----------------------------------------------------------------------------------------------")
      elseif randomtimer == 3 then
         SendToAll(Bot,"                                        //                          ")                    
         SendToAll(Bot,"                                  ( 0-0 )                          ")              
         SendToAll(Bot," -------------------oOO--------(_)---------------------------------")
         SendToAll(Bot,"            BOT creato da jackthebest                ")
         SendToAll(Bot,"------------------------------------oOO----------------------------- ")
         SendToAll(Bot,"                                 I__I__I                            ")
         SendToAll(Bot,"                                     I I I I                         ")
         SendToAll(Bot,"                                ooO Ooo                            ")      
         tmrCntrl = 0
      end
   else
      tmrCntrl = tmrCntrl + 1
   end
end

function checkFake(user)
   local s, e, shared = strfind(user.sMyInfoString, "$ALL %S+ .-$ $.+.$.-$(%d+)")
   return foreachi(badShare, function(id, value) if value == %shared then return id end end)
end
« Last Edit: 25 July, 2004, 22:09:25 by Psycho_Chihuahua »
PtokaxWiki ?PtokaX Mirror + latest Libs

01100001011011000111001101101111001000000110101101101110011011110111011101101110001000000110000101110011001000000101010001101111011010110110111101101100011011110111001101101000

Offline jackthebest

  • Fulll Member
  • ****
  • Posts: 65
  • Karma: +0/-0
(No subject)
« Reply #7 on: 25 July, 2004, 22:21:47 »
Quote
Originally posted by Psycho_Chihuahua
Testdrive 4 shows:
Code: [Select]
Syntax Error: `then' expected;|  last token read: `bOperator' at line 125
Quote
this work:
Code: [Select]
--/ (??.??.->?Alex?<-.??.???)
--/version 0.1 main function added ;)
--/version 0.2 added version commmand
--/version 0.3 added death,version and help command
--/Version 0.4 added fakeshare check
--/version 0.5 added mass message
--/version 0.6 antispaam added
--/version 0.7 fixed little bug in antispam
--/version 0.8 added antiflood
--/version 0.9 added badnick

--// Time variables
sec = 1000
min = 60 * sec
hour = 60 * min

Bot = "(??.??.->?Alex?<-.??.???)"
version = "0.9"
prefix = "!"
PMCount = {}
MainCount = {}
MaxPM = 30 --/ max 15 parole/s in pvt se + causano il ban
MaxMain = 20 --/ max 15 parole/s al secondo in main se + causano il ban
timeslice = min

tmrCntrl = 0

trigs = {
["myftpsite"]=1,["dns2go"]=2,["ip.com"]=3,["staticip"]=4,["ipactive"]=5,["ip.org"]=6,["ip.biz"]=7,["dynip.com"]=8,["d2g.com"]=9,["dyndns.org"]=10,["dynu.com"]=11,["mine.org"]=12,["kick-ass.net"]=13,["darkdata.net"]=14,["ipme.net"]=15,["udgnet.com"]=16,["sytes.net"]=17,["d2g.biz"]=18,["homeip.net"]=19,["mine.nu"]=20,["depecheconnect.com"]=21,["e-net.lv"]=22,["newgnr.com"]=23,["serveftp.com"]=24,["evildc.com"]=25,["bst.net"]=26,["bsd.net"]=27,["ods.org"]=28,["dnsalias.org"]=29,["x-host.net"]=30,["x-host.org"]=31,["bounceme.net"]=32,["myvnc.com"]=33,["sytes.net"]=34,["xs4all.net"]=35,["xs4all.nl"]=36,["kyed.com"]=37,["lir.dk"]=38,["finx.org"]=39,["ath.cx"]=40,["sheckie.net"]=41,["vizvaz.net"]=42,["servebeer.com"]=43,["snygging.net"]=44,["kicks-ass.com"]=45,["nerdcamp.net"]=46,["gotdns.org"]=47,["homeip.net"]=48,["cicileu.org"]=49,["cicileu.com"]=50,["3utilities.com"]=51,["bounceme.net"]=52,["myftp.biz"]=53,["myftp.org"]=54,["myvnc.com"]=55,["no-ip.biz"]=56,["no-ip.com"]=57,["no-ip.info"]=58,["no-ip.org"]=59,["redirectme.net"]=60,["servebeer.com"]=61,["servecounterstrike.com"]=62,["serveftp.com"]=63,["servegame.com"]=64,["servehalflife.com"]=65,["servehttp.com"]=66,["serveirc.com"]=67,["servemp3.com"]=68,["servepics.com"]=69,["servequake.com"]=70,["sytes.net"]=71,["zapto.org"]=72,["ciscofreak.com"]=73,["damnserver.com"]=74,["ditchyourip.com"]=75,["dnsiskinky.com"]=76,["geekgalaxy.com"]=77,["net-freaks.com"]=78,["no-ip.ca"]=79,["no-ip.co.uk"]=80,["no-ip.net"]=81,["point2this.com"]=82,["securityexploits.com"]=83,["securitytactics.com"]=84,["servehumour.com"]=85,["servep2p.com"]=86,["servesarcasm.com"]=87,["stufftoread.com"]=88,["unusualperson.com"]=89,["workisboring.com"]=90,["hopto"]=91,["dnsalias.net"]=92
}


arrBadNick = {
"[OP]","(op)","[admin]","(admin)","[su]","(su)","[master]",
"(master)","[moderator]","(moderator)","[adm]","(adm)","[administrator]","(administrator)",
"[fc]","(fc)","[operator]","(operator)" }

badShare = { "10000000000","5368709120","10737418240","13630010000","16106127360",
   "21474836480","26843545600","27000000000","32212254720","7970010000",
   "37580963840","37970010000","6599201000000","65992010000000","36772010000000",
   "3677201000000","42949672960","48318382080","214266156265","53687091200",
   "59055800320","1747201000000","16772010000000","147720100000000","10240000000000",
   "64424509440","65719010000","69793218560","75161927680","80530636800","85899345920",
   "91268055040","96636764160","102005473280","102400000000","107374182400","118648471552",
   "128849018880","140301549174","161061273600","174720100000","183287729356","214748364800",
   "268435456000","322122547200","375809638400","397760100000","429496729600","536870912000",
   "657190100000","1024000000000","183287729357","102392020337","13625783747","174719269601",
   "65712999629","26993869455","140295106724","21171699199" }

function Main()
frmHub:RegBot(Bot)
SetTimer(timeslice)
StartTimer()
end

function NewUserConnected(user)
   user:SendData(Bot, "weeeeee "..user.sName.." ^_^")
if checkFake(user) then
      user:SendData("*** Sei stato disconesso xke usi un fakeshare client")
user:TimeBan(20)  
end
for i=1, getn(arrBadNick) do
if (strlen(user.sName) >= strlen(arrBadNick[i])) then
if (strsub(strlower(user.sName),1,strlen(arrBadNick[i])) == strlower(arrBadNick[i])) then
user:SendData(Bot, "Stai usando un prefisso o un nick non consentito.")
user:SendData(Bot, "Non usare "..arrBadNick[i].." nel tuo nick")
user:Disconnect()
end
end
end
end

function OpConnected(user)
   if user.iProfile == 0 then  
user:SendData(Bot,"Ecco "..user.sName.." benvenuto")
SendToAll(Bot,"Un ADMIN ? entrato, un saluto a " ..user.sName)
   elseif user.iProfile == 1 then
      user:SendData(Bot,"Un saluto a "..user.sName.." siamo felici di rivederti ^_^")
      SendToAll(Bot,"Un op ? entrato, salutiamo "..user.sName)
end
if checkFake(user) then user:SendData("*** Sei stato disconesso xke usi un fakeshare client")
user:Disconnect()
end
end

function DataArrival(user,data)
   if strsub(data, 1, 1) == "<" then
      data=strsub(data,1,strlen(data)-1)
      s,e,cmd = strfind(data,"%b<>%s+(%S+)")

      if MainCount[user.sIP] ~= nil then
         MainCount[user.sIP] = MainCount[user.sIP] + 1
      elseif MainCount[user.sIP] > tonumber(MaxMain) then
         SendToAll ("# "..Bot.. "WARING--> "..user.sName .. " floddava ed e stato bannnato.")
         user:Ban()
         user:Disconnect()
      else
         MainCount[user.sIP] = 1
      end
if cmd == prefix.."version" then
user:SendData(Bot,"Questo bot e giunto alla versione: "..version)
         return 1

elseif cmd == prefix.."help" then
user:SendData(Bot,"?help Mostra queste help   ?killme autodisconetiti dal hub ?mass manda un mass message")
         return 1

elseif cmd == prefix.."killme" then
user:Disconnect()
SendToAll(Bot,user.sName.." Si e auto disconesso :D")
         return 1

elseif cmd== prefix.."massmsg" then
         if user.bOperator then
            s,e,cmd,message = strfind(data,"%s+(%S+)%s+(.*)")
            if message == nil then
               user:SendData(Bot,"Scrivi !massmsg ")
            else
               SendPmToAll(Bot," "..user.sName..": "..message)
            end
         end
      end
   end
   if (( strsub(data, 1, 1) == "<" ) or ( strsub(data, 1, 4) == "$To:" )) then
      if (not user.bOperator) then
         for key,a in trigs do
            if( strfind( strlower(data), key) ) then
               SendToAll( botname, user.sName.." kikkato per spamming" )
               user:Disconnect()
            end
         end
end
end
   if (( strsub(data,1,4) == "$To:" )) then
      if PMCount[user.sIP] ~= nil then
         PMCount[user.sIP] = PMCount[user.sIP] +1
      elseif PMCount[user.sIP] > tonumber(MaxPM) then
         SendToAll ("# "..Bot.. "WARING--> "..user.sName .. " floddava ed e stato bannnato.")
         user:Ban()
         user:Disconnect()
      else
         PMCount[user.sIP] = 1
      end
   end
end

function OnTimer()
   if tmrCntrl == 40 then
      randomtimer = random(3)
      if randomtimer == 1 then
         SendToAll(Bot,"---------------------------------------------")
         SendToAll(Bot,"----created by jackthebest-----")
         SendToAll(Bot,"---------------------------------------------")
      elseif randomtimer == 2 then
         SendToAll(Bot,"----------------------------------------------------------------------------------------------")
         SendToAll(Bot,"-----------(??.??.->?Alex?<-.??.???) written by jackthebest----------- ")
         SendToAll(Bot,"----------------------------------------------------------------------------------------------")
      elseif randomtimer == 3 then
         SendToAll(Bot,"                                        //                          ")                    
         SendToAll(Bot,"                                  ( 0-0 )                          ")              
         SendToAll(Bot," -------------------oOO--------(_)---------------------------------")
         SendToAll(Bot,"            BOT creato da jackthebest                ")
         SendToAll(Bot,"------------------------------------oOO----------------------------- ")
         SendToAll(Bot,"                                 I__I__I                            ")
         SendToAll(Bot,"                                     I I I I                         ")
         SendToAll(Bot,"                                ooO Ooo                            ")      
         tmrCntrl = 0
      end
   else
      tmrCntrl = tmrCntrl + 1
   end
end

function checkFake(user)
   local s, e, shared = strfind(user.sMyInfoString, "$ALL %S+ .-$ $.+.$.-$(%d+)")
   return foreachi(badShare, function(id, value) if value == %shared then return id end end)
end

Offline jackthebest

  • Fulll Member
  • ****
  • Posts: 65
  • Karma: +0/-0
(No subject)
« Reply #8 on: 25 July, 2004, 22:31:40 »
ummmm...
there aren't any Syntax Errors in the script...
but my problem  is unresolved the help , killme and massmasg commands don't work  ;(
« Last Edit: 25 July, 2004, 22:33:34 by jackthebest »

Offline kepp

  • Scripter
  • King
  • ******
  • Posts: 790
  • Karma: +2/-0
(No subject)
« Reply #9 on: 26 July, 2004, 09:30:06 »
I weren't going to get it work for you..
Just show you how to Continue writing after a snippet.
Guarding    

Offline jackthebest

  • Fulll Member
  • ****
  • Posts: 65
  • Karma: +0/-0
(No subject)
« Reply #10 on: 26 July, 2004, 13:38:46 »
Quote
Originally posted by kepp
I weren't going to get it work for you..
Just show you how to Continue writing after a snippet.

i'm sorry...
i'm not english i haven't undestend
 snippet  <-----what is?

Offline jackthebest

  • Fulll Member
  • ****
  • Posts: 65
  • Karma: +0/-0
(No subject)
« Reply #11 on: 26 July, 2004, 14:24:52 »
Code: [Select]
Syntax Error: attempt to compare nil with number
Syntax Error: attempt to compare nil with number
Syntax Error: attempt to compare nil with number
Syntax Error: attempt to compare nil with number
Syntax Error: attempt to compare nil with number
Syntax Error: attempt to compare nil with number
Syntax Error: attempt to compare nil with number
why this  ;(  ;(  ;( ;(  ;(  ;( ;(  ;(  ;( ;(  ;(  ;( ;(  ;(  ;(
;(  ;(  ;( ;(  ;(  ;( ;(  ;(  ;( ;(  ;(  ;( ;(  ;(  ;( ;(  ;(  ;( ;(  ;(  ;(

Offline Optimus

  • Emperor
  • **
  • Posts: 1 474
  • Karma: +13/-1
(No subject)
« Reply #12 on: 26 July, 2004, 15:52:03 »
Hi jack when you got this bot ready you sure have learned something. Thats's the good thing about it. Keep going  ;)

Offline jackthebest

  • Fulll Member
  • ****
  • Posts: 65
  • Karma: +0/-0
(No subject)
« Reply #13 on: 26 July, 2004, 17:15:32 »
Quote
Originally posted by Optimus
Hi jack when you got this bot ready you sure have learned something. Thats's the good thing about it. Keep going  ;)
hi opti

 X(

 this is my first large bot; the fakecheck and badnik are copied to nerbos....
Quote
THX to nerbos for the fakecheck and badnik :D
THX to patthy and her lesson :D
« Last Edit: 26 July, 2004, 17:17:24 by jackthebest »

Offline kepp

  • Scripter
  • King
  • ******
  • Posts: 790
  • Karma: +2/-0
(No subject)
« Reply #14 on: 26 July, 2004, 22:21:48 »
And it is indeed a very good start!!

Syntax Error: attempt to compare nil with number

^^ nil is as you may allready know, NADA, Nothing
it's null / 0 ( Get the point ? )

That should give you some help on were the problem is

Keep going
Guarding    

Offline jackthebest

  • Fulll Member
  • ****
  • Posts: 65
  • Karma: +0/-0
(No subject)
« Reply #15 on: 27 July, 2004, 11:44:02 »
this work...
There are 2 data DataArrival
but it work and there are no syntax error..  :rolleyes:
hi to all
Code: [Select]
--/created by jackthebest
--/ (??.??.->?Alex?<-.??.???) ? by jackthebest :D
--/version 0.1 main function added ;)
--/version 0.2 added version commmand
--/version 0.3 added death,version and help command
--/Version 0.4 added fakeshare check
--/version 0.5 added mass message
--/version 0.6 antispaam added
--/version 0.7 fixed little bug in antispam
--/version 0.8 added antiflood
--/version 0.9 added badnick
--/version 1.0 fixed bug in help , massmsg, death command

Bot = "(??.??.->?Alex?<-.??.???)"
version = "1.0"
prefix = "?"

function Main()
frmHub:RegBot(Bot)
end



badShare = { "10000000000","5368709120","10737418240","13630010000","16106127360",
"21474836480","26843545600","27000000000","32212254720","7970010000",
"37580963840","37970010000","6599201000000","65992010000000","36772010000000",
"3677201000000","42949672960","48318382080","214266156265","53687091200",
"59055800320","1747201000000","16772010000000","147720100000000","10240000000000",
"64424509440","65719010000","69793218560","75161927680","80530636800","85899345920",
"91268055040","96636764160","102005473280","102400000000","107374182400","118648471552",
"128849018880","140301549174","161061273600","174720100000","183287729356","214748364800",
"268435456000","322122547200","375809638400","397760100000","429496729600","536870912000",
"657190100000","1024000000000","183287729357","102392020337","13625783747","174719269601",
"65712999629","26993869455","140295106724","21171699199" }

function checkFake(user)
local s, e, shared = strfind(user.sMyInfoString, "$ALL %S+ .-$ $.+.$.-$(%d+)")
return foreachi(badShare, function(id, value) if value == %shared then return id end end)
end
 
function OpConnected(user)
if user.iProfile == 0 then  
user:SendData(Bot,"Ecco "..user.sName.." benvenuto")
SendToAll(Bot,"Un ADMIN ? entrato, un saluto a " ..user.sName)
return 1
end
        if user.iProfile == 1 then
user:SendData(Bot,"Un saluto a "..user.sName.." siamo felici di rivederti ^_^")
SendToAll(Bot,"Un op ? entrato, salutiamo "..user.sName)
return 1
end
if checkFake(user) then user:SendData("*** Sei stato disconesso xke usi un fakeshare client")
user:Disconnect()
end

end
function NewUserConnected(user)
user:SendData(Bot, "weeeeee "..user.sName.." ^_^")
if checkFake(user) then user:SendData("*** Sei stato disconesso xke usi un fakeshare client")
user:TimeBan(20)  
end
end






PMCount = {}
MainCount = {}
MaxPM = 30 --/ max  15 parole al secondo in pvt se no ban
MaxMain = 20 --/ max 15 parole al secondo in main se no
timeslice = 10*1000 -- 15 seconds

trigs = {
["myftpsite"]=1,["dns2go"]=2,["ip.com"]=3,["staticip"]=4,["ipactive"]=5,["ip.org"]=6,["ip.biz"]=7,["dynip.com"]=8,["d2g.com"]=9,["dyndns.org"]=10,["dynu.com"]=11,["mine.org"]=12,["kick-ass.net"]=13,["darkdata.net"]=14,["ipme.net"]=15,["udgnet.com"]=16,["sytes.net"]=17,["d2g.biz"]=18,["homeip.net"]=19,["mine.nu"]=20,["depecheconnect.com"]=21,["e-net.lv"]=22,["newgnr.com"]=23,["serveftp.com"]=24,["evildc.com"]=25,["bst.net"]=26,["bsd.net"]=27,["ods.org"]=28,["dnsalias.org"]=29,["x-host.net"]=30,["x-host.org"]=31,["bounceme.net"]=32,["myvnc.com"]=33,["sytes.net"]=34,["xs4all.net"]=35,["xs4all.nl"]=36,["kyed.com"]=37,["lir.dk"]=38,["finx.org"]=39,["ath.cx"]=40,["sheckie.net"]=41,["vizvaz.net"]=42,["servebeer.com"]=43,["snygging.net"]=44,["kicks-ass.com"]=45,["nerdcamp.net"]=46,["gotdns.org"]=47,["homeip.net"]=48,["cicileu.org"]=49,["cicileu.com"]=50,["3utilities.com"]=51,["bounceme.net"]=52,["myftp.biz"]=53,["myftp.org"]=54,["myvnc.com"]=55,["no-ip.biz"]=56,["no-ip.com"]=57,["no-ip.info"]=58,["no-ip.org"]=59,["redirectme.net"]=60,["servebeer.com"]=61,["servecounterstrike.com"]=62,["serveftp.com"]=63,["servegame.com"]=64,["servehalflife.com"]=65,["servehttp.com"]=66,["serveirc.com"]=67,["servemp3.com"]=68,["servepics.com"]=69,["servequake.com"]=70,["sytes.net"]=71,["zapto.org"]=72,["ciscofreak.com"]=73,["damnserver.com"]=74,["ditchyourip.com"]=75,["dnsiskinky.com"]=76,["geekgalaxy.com"]=77,["net-freaks.com"]=78,["no-ip.ca"]=79,["no-ip.co.uk"]=80,["no-ip.net"]=81,["point2this.com"]=82,["securityexploits.com"]=83,["securitytactics.com"]=84,["servehumour.com"]=85,["servep2p.com"]=86,["servesarcasm.com"]=87,["stufftoread.com"]=88,["unusualperson.com"]=89,["workisboring.com"]=90,["hopto"]=91,["dnsalias.net"]=92
}

function Main()
frmHub:RegBot(Bot)
end

function DataArrival(user, data)
if (not user.bOperator) then
if (( strsub(data, 1, 1) == "<" ) or ( strsub(data, 1, 4) == "$To:" )) then
for key,a in trigs do
if( strfind( strlower(data), key) ) then
SendToAll( botname, user.sName.." kikkato per spamming" )
user:Disconnect()
end
end
end
end
end







PMCount = {}
MainCount = {}
MaxPM = 30 --/ max 15 parole/s in pvt se + causano il ban
MaxMain = 20 --/ max 15 parole/s al secondo in main se + causano il ban
timeslice = 10*1000 -- 15 seconds

function Main()
frmHub:RegBot(Bot)
SetTimer(timeslice)
StartTimer()
end

function DataArrival(curUser, sData)
if strfind(sData,"$To:") then
if PMCount[curUser.sIP] ~= nil then
PMCount[curUser.sIP] = PMCount[curUser.sIP] +1
--SendToAll("----",PMCount[curUser.sIP])

if PMCount[curUser.sIP] > MaxPM then
FloodDetected (curUser, sData)
PMCount[curUser.sIP] = -100
end
else
PMCount[curUser.sIP] = 1
end
elseif strfind(sData,curUser.sName,1,plain) == 2 then
if MainCount[curUser.sIP] ~= nil then
MainCount[curUser.sIP] = MainCount[curUser.sIP] +1
--SendToAll("----",PMCount[curUser.sIP])
if MainCount[curUser.sIP] > MaxMain then
FloodDetected (curUser, sData)
MainCount[curUser.sIP] = -100
end
else
MainCount[curUser.sIP] = 1
end
end
end

function OnTimer()
--for k,v in PMCount do
--SendToAll("---------",k.."\t"..v)
--end
PMCount = {}
MainCount = {}
end

function FloodDetected (curUser,sData)
SendToAll ("# "..Bot.. "WARING--> "..name .. " floddava ed e stato bannnato.")
curUser:Ban()
curUser:Disconnect()
end

arrBadNick = {
"[OP]","(op)","[admin]","(admin)","[su]","(su)","[master]",
"(master)","[moderator]","(moderator)","[adm]","(adm)","[administrator]","(administrator)",
"[fc]","(fc)","[operator]","(operator)"
}

function Main()
frmHub:RegBot(Bot)
SetTimer(150*6000)
StartTimer()
end

function OnTimer()
randomtimer = random(3)
if randomtimer == 1 then
SendToAll(Bot,"---------------------------------------------")
SendToAll(Bot,"----write /fav-----")
SendToAll(Bot,"---------------------------------------------")
elseif randomtimer == 2 then
SendToAll(Bot,"----------------------------------------------------------------------------------------------")
SendToAll(Bot,"-----------(??.??.->?Alex?<-.??.???) write fav----------- ")
SendToAll(Bot,"----------------------------------------------------------------------------------------------")
elseif randomtimer == 3 then
SendToAll(Bot,"                                        //                          ")                    
SendToAll(Bot,"                                  ( 0-0 )                          ")              
SendToAll(Bot," -------------------oOO--------(_)---------------------------------")
SendToAll(Bot,"     write /fav                ")
                SendToAll(Bot,"------------------------------------oOO----------------------------- ")
SendToAll(Bot,"                                 I__I__I                            ")
SendToAll(Bot,"                                     I I I I                         ")
                SendToAll(Bot,"                                ooO Ooo                            ")                

end
end

function NewUserConnected(user)
for i=1, getn(arrBadNick) do
if (strlen(user.sName) >= strlen(arrBadNick[i])) then
if (strsub(strlower(user.sName),1,strlen(arrBadNick[i])) == strlower(arrBadNick[i])) then
user:SendData(Bot, "Stai usando un prefisso o un nick non consentito.")
user:SendData(Bot, "Non usare "..arrBadNick[i].." nel tuo nick")
user:Disconnect()
end
end
end
end

function Main()
frmHub:RegBot(Bot)
end


function DataArrival(user,data)
if strsub(data, 1, 1) == "<" then
data=strsub(data,1,strlen(data)-1)
s,e,cmd = strfind(data,"%b<>%s+(%S+)")
 
if cmd == prefix.."version" then
user:SendData(Bot,"Questo bot e giunto alla versione: "..version)
return 1

elseif cmd == prefix.."help" then
user:SendData(Bot,"Quando ho un po di tempo metto le help :P")
return 1

elseif cmd == prefix.."killme" then
user:Disconnect()
SendToAll(Bot,user.sName.." Si e auto disconesso :D")
return 1
elseif (cmd == prefix.."massmsg") then
if user.bOperator then
s,e,cmd,message = strfind(data,"%s+(%S+)%s+(.*)")
SendPmToAll(Bot," "..user.sName..": "..message)
end

end
end
end

Offline kepp

  • Scripter
  • King
  • ******
  • Posts: 790
  • Karma: +2/-0
(No subject)
« Reply #16 on: 27 July, 2004, 18:54:11 »
Why 2 DataArrivals when you only need one?
Guarding    

Offline jackthebest

  • Fulll Member
  • ****
  • Posts: 65
  • Karma: +0/-0
(No subject)
« Reply #17 on: 27 July, 2004, 19:21:22 »
Quote
Originally posted by kepp
Why 2 DataArrivals when you only need one?

Whit 1 DataArrivals doesn ' t work  8o

[NL]Pur

  • Guest
(No subject)
« Reply #18 on: 02 August, 2004, 16:33:12 »
did you change all the curUser of the first dataArrival in user ;)

Offline Troubadour

  • Scripter
  • Lord
  • ******
  • Posts: 309
  • Karma: +6/-0
  • Be yourself, there are plenty others allready.....
    • Jeugdhonk
(No subject)
« Reply #19 on: 02 August, 2004, 18:01:47 »
First of all the data arrivals (the first and second can be putt together as one and still function)
Also the first contains curUser and the second uses user (this doesn't mather and will work each, no mather what is used even if you should use blabla instead of curUser it should work)
When putt together in one Data Arival then it should be both user instead or both curUser.
Will look at it tomorrow (when i got more time)

Regards,
Troubadour
Regards,

Troubadour

** Guardian Forum **

hubaddy:   nederfun.no-ip.com

[NL]Pur

  • Guest
(No subject)
« Reply #20 on: 03 August, 2004, 14:20:04 »
Quote
When putt together in one Data Arival then it should be both user instead or both curUser.


this is what i mean by it ;)

Offline jackthebest

  • Fulll Member
  • ****
  • Posts: 65
  • Karma: +0/-0
(No subject)
« Reply #21 on: 03 August, 2004, 18:01:55 »
Quote
Originally posted by [NL]Pur
did you change all the curUser of the first dataArrival in user ;)


alex is at v1.4 there are' t any problem at the moment

:D

THX to all
« Last Edit: 03 August, 2004, 18:04:09 by jackthebest »

Offline Troubadour

  • Scripter
  • Lord
  • ******
  • Posts: 309
  • Karma: +6/-0
  • Be yourself, there are plenty others allready.....
    • Jeugdhonk
(No subject)
« Reply #22 on: 03 August, 2004, 19:00:26 »
Nice to hear, your bot is working now.
Still curious how it is growing!
Regards,

Troubadour

** Guardian Forum **

hubaddy:   nederfun.no-ip.com

Offline jackthebest

  • Fulll Member
  • ****
  • Posts: 65
  • Karma: +0/-0
(No subject)
« Reply #23 on: 04 August, 2004, 00:57:04 »
Quote
Originally posted by Troubadour
Nice to hear, your bot is working now.
Still curious how it is growing!

eheheheheh :D

PtokaX forum

(No subject)
« Reply #23 on: 04 August, 2004, 00:57:04 »