This Bot doesn't work
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

This Bot doesn't work

Started by jackthebest, 25 July, 2004, 15:13:21

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jackthebest

--/ (??.??.->?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  ;(

jackthebest

QuoteOriginally 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:

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 :)
Guarding    

jackthebest

QuoteOriginally 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
--/ (??.??.->?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!  ;(

jackthebest

--/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

kepp

A quik cleanup...
--/ (??.??.->?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    

Psycho_Chihuahua

#6
Testdrive 4 shows:
Syntax Error: `then' expected;|  last token read: `bOperator' at line 125

Try this:
--/ (??.??.->?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
PtokaxWiki ?PtokaX Mirror + latest Libs

01100001011011000111001101101111001000000110101101101110011011110111011101101110001000000110000101110011001000000101010001101111011010110110111101101100011011110111001101101000

jackthebest

QuoteOriginally posted by Psycho_Chihuahua
Testdrive 4 shows:
Syntax Error: `then' expected;|  last token read: `bOperator' at line 125
Quotethis work:
--/ (??.??.->?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

jackthebest

#8
ummmm...
there aren't any Syntax Errors in the script...
but my problem  is unresolved the help , killme and massmasg commands don't work  ;(

kepp

I weren't going to get it work for you..
Just show you how to Continue writing after a snippet.
Guarding    

jackthebest

QuoteOriginally 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?

jackthebest

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  ;(  ;(  ;( ;(  ;(  ;( ;(  ;(  ;( ;(  ;(  ;( ;(  ;(  ;(
;(  ;(  ;( ;(  ;(  ;( ;(  ;(  ;( ;(  ;(  ;( ;(  ;(  ;( ;(  ;(  ;( ;(  ;(  ;(

Optimus

Hi jack when you got this bot ready you sure have learned something. Thats's the good thing about it. Keep going  ;)

jackthebest

#13
QuoteOriginally 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....
QuoteTHX to nerbos for the fakecheck and badnik :D
THX to patthy and her lesson :D

kepp

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    

jackthebest

this work...
There are 2 data DataArrival
but it work and there are no syntax error..  :rolleyes:
hi to all
--/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

kepp

Why 2 DataArrivals when you only need one?
Guarding    

jackthebest

QuoteOriginally posted by kepp
Why 2 DataArrivals when you only need one?

Whit 1 DataArrivals doesn ' t work  8o

[NL]Pur

did you change all the curUser of the first dataArrival in user ;)

Troubadour

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

QuoteWhen putt together in one Data Arival then it should be both user instead or both curUser.

this is what i mean by it ;)

jackthebest

#21
QuoteOriginally 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

Troubadour

Nice to hear, your bot is working now.
Still curious how it is growing!
Regards,

Troubadour

** Guardian Forum **

hubaddy:   nederfun.no-ip.com

jackthebest

QuoteOriginally posted by Troubadour
Nice to hear, your bot is working now.
Still curious how it is growing!

eheheheheh :D

SMF spam blocked by CleanTalk