a little modification please - Page 3
 

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

a little modification please

Started by [NL]trucker, 12 February, 2004, 09:46:49

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

nErBoS

Hi,

Try out this one..

-- Simple Illegalist v0.1 
-- Created by Ptaczek, Jan-3, 2003 
-- Searches for specified patterns. Useful for illegal share checking 
-- some changes by Skippy and RabidWombat and OpiumVolage and trucker 
-- add tables warn and kick by nErBoS

BotName = "Illegalist" 

function Main()
frmHub:RegBot(BotName) 
frmHub:EnableSearchData(1) 
end 

Files = { 
["childsex"]="NO sick Porn inhere!", 
["childporn"]="NO sick kid Porn inhere!", 
["underage"]="NO sick kid Porn inhere!", 
["animalsex"]="NO Animalsex files here!", 
["svastika"]="NO Nazi/white power music HERE!!!", 
[".temp.mp3"]="NO sharing of incomplete downloads", 
["_INCOMPLETE_"]="NO sharing of incomplete downloads", 
["download123456789.dat"]="NO sharing of incomplete downloads", 
["part.met"]="NO sharing of incomplete downloads", 
[".getright"]="NO sharing of incomplete downloads", 
[".vob"]="NO sharing of incomplete downloads", 
["share faker"]="NO tools for fake sharing allowed", 
["share hacker"]="No tools for fake sharing allowed"} 

warn = {}
kick = {}
usersimune = {"nErBoS", "[NL]trucker","(uk-kingdom)John","(UKD)John","[NL]{VIP}Geroni", 
"[NL]Coco","[NL]Dark_bad_girl","[NL]DiGARiX","[NL]GePe","[NL]M@non","[NL]movieman","[NL]SuusTweety", 
"[NL]voodoo","[NL]ZeroX","Chupi?","DoJiN","hhps","[UKD]jiorgee","Quaraf","Sweet_Bitch", 
"TheWickedRabbit","Serima","[NL]partyfever","[NL]AiR"} -- Usres you want to not be checked 

kicklog = "kicks.txt" -- In script folder
main = "Active" --- write Deactive and will not send the kicks and bans to the main


function NewUserConnected(user)
if (warn[user.sName] == nil or warn[user.sName] == 4) then 
warn[user.sName] = 0
end
if (kick[user.sName] == nil or kick[user.sName] == 4) then
kick[user.sName] = 0
end

for i,v in Files do 
user:SendData("$Search Hub:"..BotName.." F?F?0?1?"..i) 
end 
end 

function DataArrival(user, data)
 
if( strsub(data, 1, 3) == "$SR" ) then 
_,_,nick = strfind( data, "\05(%S*)|$" ) 
local s = 5 + strlen(user.sName)
local e = strfind(data, "%d+%s%d+/%d+")
if (e == nil) then
e = 2
end
e = e - 2
local path = strsub(data, s, e)
if( nick == BotName) then
	for i=1,getn(usersimune) do 
	if (user.bOperator or user.sName == usersimune[i]) then
	return 1
	end
	end
	if (GetProfileName(user.iProfile) == "VIP") then
		if (kick[user.sName] == 3) then
			ClearNill(user)
			kick[user.sName] = kick[user.sName] + 1
			Reason = FindWhat(data) 
			SendPmToNick("[NL]trucker", BotName, "*** User "..user.sName.." got ban. Reason: "..Reason.." FILE: "..path) 
			user:SendPM(BotName,"You have been banned. "..Reason)
			if (main == "Active" ) then
				SendToAll(BotName, "The user "..user.sName.." is been banned for "..Reason)
			end
			if (main == "Deactive") then
				return 1
			end
			user:Ban() 
		elseif (warn[user.sName] == 3 or kick[user.sName] == 1 or kick[user.sName] == 2) then
			ClearNill(user)
			warn[user.sName] = warn[user.sName] + 1
			kick[user.sName] = kick[user.sName] + 1
			Reason = FindWhat(data) 
			SendPmToNick("[NL]trucker", BotName, "*** User "..user.sName.." got "..kick[user.sName].." kicks. Reason: "..Reason.." FILE: "..path) 
			user:SendPM(BotName,"You have been kicked "..kick[user.sName].." time(s) at 3 you will be ban. "..Reason.." FILE: "..path)
			appendto(kicklog) 
			write("\r\n"..user.sName.."|"..Reason.."|"..path.."|"..kick[user.sName].."|"..GetTime()) 
			writeto()
			if (main == "Active" ) then
				SendToAll(BotName, "The user "..user.sName.." is been kicked for "..Reason)
			end
			if (main == "Deactive") then
				return 1
			end
			user:TempBan() 
		elseif (warn[user.sName] == 0 or warn[user.sName] == 1 or warn[user.sName] == 2) then
			ClearNill(user)
			warn[user.sName] = warn[user.sName] + 1
			Reason = FindWhat(data) 
			SendPmToNick("[NL]trucker", BotName, "*** User "..user.sName.." got "..warn[user.sName].." warns. Reason: "..Reason.." FILE: "..path) 
			user:SendPM(BotName, "You have been warned "..warn[user.sName].." time(s) at 3 you will be kicked. "..Reason.." FILE: "..path)
			user:SendPM(BotName, "You can come back when you have corrected the problem")
			user:SendPM(BotName, "Disconnected...") 
			user:Disconnect() 
		end
	elseif not(user.bOperator and GetProfileName(user.iProfile) == "VIP" and user.sName == usersimune[i]) then --this will solve the double log i think
		if (kick[user.sName] == 3) then
			ClearNill(user)
			kick[user.sName] = kick[user.sName] + 1
			Reason = FindWhat(data) 
			SendPmToNick("[NL]trucker", BotName, "*** User "..user.sName.." got ban. Reason: "..Reason.." FILE: "..path) 
			user:SendPM(BotName,"You have been banned. "..Reason)
			if (main == "Active" ) then
				SendToAll(BotName, "The user "..user.sName.." is been banned for "..Reason)
			end
			if (main == "Deactive") then
				return 1
			end
			user:Ban() 
		elseif (kick[user.sName] == 0 or kick[user.sName] == 1 or kick[user.sName] == 2) then
			ClearNill(user)
			kick[user.sName] = kick[user.sName] + 1
			user:SendData(Bot, kick[user.sName])
			Reason = FindWhat(data) 
			SendPmToNick("[NL]trucker", BotName, "*** User "..user.sName.." got "..kick[user.sName].." kicks. Reason: "..Reason.." FILE: "..path) 
			user:SendPM(BotName,"You have been kicked "..kick[user.sName].." time(s) at 3 you will be ban. "..Reason.." FILE: "..path)
			appendto(kicklog) 
			write("\r\n"..user.sName.."|"..Reason.."|"..path.."|"..kick[user.sName].."|"..GetTime()) 
			writeto()
			if (main == "Active" ) then
				SendToAll(BotName, "The user "..user.sName.." is been kicked for "..Reason)
			end
			if (main == "Deactive") then
				return 1
			end
			user:TempBan() 
		end
	end
end 
end
end 

function FindWhat(data) 
for i,v in Files do 
if( strfind(strlower(data), i) ) then 
return v 
end 
end 
return "Other files" 
end  

function GetTime()
	s = date("%S")
	h = date("%H")
	m = date("%M")
	d = date("%d")
	mm = date("%m")
	y = date("%y")
	Date = "Day: "..d.."/"..mm.."/20"..y.." Hour: "..h..":"..m..":"..s
	return Date

end

function ClearNill(user)
	if (warn[user.sName] == nil) then 
		warn[user.sName] = 0
	end
	if (kick[user.sName] == nil) then
		kick[user.sName] = 0
	end
end

Best regards, nErBoS
--## nErBoS Spot ##--

nErBoS

Hi,

Believe i have found the error for this script, try this...

-- Simple Illegalist v0.1 
-- Created by Ptaczek, Jan-3, 2003 
-- Searches for specified patterns. Useful for illegal share checking 
-- some changes by Skippy and RabidWombat and OpiumVolage and trucker 
-- add tables warn and kick by nErBoS

BotName = "Illegalist" 

function Main()
frmHub:RegBot(BotName) 
frmHub:EnableSearchData(1) 
end 

Files = { 
["childsex"]="NO sick Porn inhere!", 
["childporn"]="NO sick kid Porn inhere!", 
["underage"]="NO sick kid Porn inhere!", 
["animalsex"]="NO Animalsex files here!", 
["svastika"]="NO Nazi/white power music HERE!!!", 
[".temp.mp3"]="NO sharing of incomplete downloads", 
["_INCOMPLETE_"]="NO sharing of incomplete downloads", 
["download123456789.dat"]="NO sharing of incomplete downloads", 
["part.met"]="NO sharing of incomplete downloads", 
[".getright"]="NO sharing of incomplete downloads", 
[".vob"]="NO sharing of incomplete downloads", 
["share faker"]="NO tools for fake sharing allowed", 
["share hacker"]="No tools for fake sharing allowed"} 

warn = {}
kick = {}
usersimune = {"nErBoS", "[NL]trucker","(uk-kingdom)John","(UKD)John","[NL]{VIP}Geroni", 
"[NL]Coco","[NL]Dark_bad_girl","[NL]DiGARiX","[NL]GePe","[NL]M@non","[NL]movieman","[NL]SuusTweety", 
"[NL]voodoo","[NL]ZeroX","Chupi?","DoJiN","hhps","[UKD]jiorgee","Quaraf","Sweet_Bitch", 
"TheWickedRabbit","Serima","[NL]partyfever","[NL]AiR"} -- Usres you want to not be checked 

kicklog = "kicks.txt" -- In script folder
main = "Active" --- write Deactive and will not send the kicks and bans to the main


function NewUserConnected(user)
if (warn[user.sName] == nil or warn[user.sName] == 4) then 
warn[user.sName] = 0
end
if (kick[user.sName] == nil or kick[user.sName] == 4) then
kick[user.sName] = 0
end

for i,v in Files do 
user:SendData("$Search Hub:"..BotName.." F?F?0?1?"..i) 
end 
end 

function DataArrival(user, data)
 
if( strsub(data, 1, 3) == "$SR" ) then 
_,_,nick = strfind( data, "\05(%S*)|$" )
local s,e,path = strfind(data, "$SR%s+%S+%s+(.+)%x+%s+%x+/%x+")
if( nick == BotName) then
	for i=1,getn(usersimune) do 
	if (user.bOperator or user.sName == usersimune[i]) then
	return 1
	end
	end
	if (GetProfileName(user.iProfile) == "VIP") then
		if (kick[user.sName] == 3) then
			ClearNill(user)
			kick[user.sName] = kick[user.sName] + 1
			Reason = FindWhat(data) 
			SendPmToNick("[NL]trucker", BotName, "*** User "..user.sName.." got ban. Reason: "..Reason.." FILE: "..path) 
			user:SendPM(BotName,"You have been banned. "..Reason)
			if (main == "Active" ) then
				SendToAll(BotName, "The user "..user.sName.." is been banned for "..Reason)
			end
			if (main == "Deactive") then
				return 1
			end
			user:Ban() 
		elseif (warn[user.sName] == 3 or kick[user.sName] == 1 or kick[user.sName] == 2) then
			ClearNill(user)
			warn[user.sName] = warn[user.sName] + 1
			kick[user.sName] = kick[user.sName] + 1
			Reason = FindWhat(data) 
			SendPmToNick("[NL]trucker", BotName, "*** User "..user.sName.." got "..kick[user.sName].." kicks. Reason: "..Reason.." FILE: "..path) 
			user:SendPM(BotName,"You have been kicked "..kick[user.sName].." time(s) at 3 you will be ban. "..Reason.." FILE: "..path)
			appendto(kicklog) 
			write("\r\n"..user.sName.."|"..Reason.."|"..path.."|"..kick[user.sName].."|"..GetTime()) 
			writeto()
			if (main == "Active" ) then
				SendToAll(BotName, "The user "..user.sName.." is been kicked for "..Reason)
			end
			if (main == "Deactive") then
				return 1
			end
			user:TempBan() 
		elseif (warn[user.sName] == 0 or warn[user.sName] == 1 or warn[user.sName] == 2) then
			ClearNill(user)
			warn[user.sName] = warn[user.sName] + 1
			Reason = FindWhat(data) 
			SendPmToNick("[NL]trucker", BotName, "*** User "..user.sName.." got "..warn[user.sName].." warns. Reason: "..Reason.." FILE: "..path) 
			user:SendPM(BotName, "You have been warned "..warn[user.sName].." time(s) at 3 you will be kicked. "..Reason.." FILE: "..path)
			user:SendPM(BotName, "You can come back when you have corrected the problem")
			user:SendPM(BotName, "Disconnected...") 
			user:Disconnect() 
		end
	elseif not(user.bOperator and GetProfileName(user.iProfile) == "VIP" and user.sName == usersimune[i]) then --this will solve the double log i think
		if (kick[user.sName] == 3) then
			ClearNill(user)
			kick[user.sName] = kick[user.sName] + 1
			Reason = FindWhat(data) 
			SendPmToNick("[NL]trucker", BotName, "*** User "..user.sName.." got ban. Reason: "..Reason.." FILE: "..path) 
			user:SendPM(BotName,"You have been banned. "..Reason)
			if (main == "Active" ) then
				SendToAll(BotName, "The user "..user.sName.." is been banned for "..Reason)
			end
			if (main == "Deactive") then
				return 1
			end
			user:Ban() 
		elseif (kick[user.sName] == 0 or kick[user.sName] == 1 or kick[user.sName] == 2) then
			ClearNill(user)
			kick[user.sName] = kick[user.sName] + 1
			user:SendData(Bot, kick[user.sName])
			Reason = FindWhat(data) 
			SendPmToNick("[NL]trucker", BotName, "*** User "..user.sName.." got "..kick[user.sName].." kicks. Reason: "..Reason.." FILE: "..path) 
			user:SendPM(BotName,"You have been kicked "..kick[user.sName].." time(s) at 3 you will be ban. "..Reason.." FILE: "..path)
			appendto(kicklog) 
			write("\r\n"..user.sName.."|"..Reason.."|"..path.."|"..kick[user.sName].."|"..GetTime()) 
			writeto()
			if (main == "Active" ) then
				SendToAll(BotName, "The user "..user.sName.." is been kicked for "..Reason)
			end
			if (main == "Deactive") then
				return 1
			end
			user:TempBan() 
		end
	end
end 
end
end 

function FindWhat(data) 
for i,v in Files do 
if( strfind(strlower(data), i) ) then 
return v 
end 
end 
return "Other files" 
end  

function GetTime()
	s = date("%S")
	h = date("%H")
	m = date("%M")
	d = date("%d")
	mm = date("%m")
	y = date("%y")
	Date = "Day: "..d.."/"..mm.."/20"..y.." Hour: "..h..":"..m..":"..s
	return Date

end

function ClearNill(user)
	if (warn[user.sName] == nil) then 
		warn[user.sName] = 0
	end
	if (kick[user.sName] == nil) then
		kick[user.sName] = 0
	end
end

Best regards, nErBoS
--## nErBoS Spot ##--

[NL]trucker

thnx m8 was waiting for an update ...

gonna test it as usual
Owner of FunnyHub
 
Funyhub.no-ip.info
       Forum Master of


prtjoe

its not working for me, i did a little modification hope i did it right          heres what i did
_________________________________________________

-- Simple Illegalist v0.1

-- Created by Ptaczek, Jan-3, 2003

-- Searches for specified patterns. Useful for illegal share checking

-- some changes by Skippy and RabidWombat and OpiumVolage and trucker

-- add tables warn and kick by nErBoS



BotName = "Illegalist"


function Main()

frmHub:EnableSearchData(1)

end



Files = {

["childsex"]="NO sick Porn inhere!",

["kiddy"]="NO sick Porn inhere!",

["childporn"]="NO sick kid Porn inhere!",

["underage"]="NO sick kid Porn inhere!",

["animalsex"]="NO Animalsex files here!",

["svastika"]="NO Nazi/white power music HERE!!!",

[".temp.mp3"]="NO sharing of incomplete downloads",

["_INCOMPLETE_"]="NO sharing of incomplete downloads",

["download123456789.dat"]="NO sharing of incomplete downloads",

["part.met"]="NO sharing of incomplete downloads",

[".getright"]="NO sharing of incomplete downloads",

[".vob"]="NO sharing of incomplete downloads",

["share faker"]="NO tools for fake sharing allowed",

["share hacker"]="No tools for fake sharing allowed"}



warn = {}

kick = {}

usersimune = {"Prtjoe","squashman","markos","Driver","Fairytinkle","Gandalf_The_White","Mpfree","Muckysness","RyGuy","TTboy",
"visiondj","zee","????.XYZ.????","??????Hawk??????","Account_Active","Argath","chrisshuk","itsonlyme?","Pothead","PRODIGY","ToughNgO"} -- Usres you want to not be checked



kicklog = "kicks.txt" -- In script folder

main = "Active" --- write Deactive and will not send the kicks and bans to the main





function NewUserConnected(user)

if (warn[user.sName] == nil or warn[user.sName] == 4) then

warn[user.sName] = 0

end

if (kick[user.sName] == nil or kick[user.sName] == 4) then

kick[user.sName] = 0

end



for i,v in Files do

user:SendData("$Search Hub:"..BotName.." F?F?0?1?"..i)

end

end



function DataArrival(user, data)

 
if( strsub(data, 1, 3) == "$SR" ) then

_,_,nick = strfind( data, "\05(%S*)|$" )

local s,e,path = strfind(data, "$SR%s+%S+%s+(.+)%x+%s+%x+/%x+")

if( nick == BotName) then

   for i=1,getn(usersimune) do

   if (user.bOperator or user.sName == usersimune) then

   return 1

   end

   end

   if (GetProfileName(user.iProfile) == "VIP") then

      if (kick[user.sName] == 3) then

         ClearNill(user)

         kick[user.sName] = kick[user.sName] + 1

         Reason = FindWhat(data)

         SendPmToNick("Prtjoe", BotName, "*** User "..user.sName.." got ban. Reason: "..Reason.." FILE: "..path)

         user:SendPM(BotName,"You have been banned. "..Reason)

         if (main == "Active" ) then

            SendToAll(BotName, "The user "..user.sName.." is been banned for "..Reason)

         end

         if (main == "Deactive") then

            return 1

         end

         user:Ban()

      elseif (warn[user.sName] == 3 or kick[user.sName] == 1 or kick[user.sName] == 2) then

         ClearNill(user)

         warn[user.sName] = warn[user.sName] + 1

         kick[user.sName] = kick[user.sName] + 1

         Reason = FindWhat(data)

         SendPmToNick("Prtjoe", BotName, "*** User "..user.sName.." got "..kick[user.sName].." kicks. Reason: "..Reason.." FILE: "..path)

         user:SendPM(BotName,"You have been kicked "..kick[user.sName].." time(s) at 3 you will be ban. "..Reason.." FILE: "..path)

         appendto(kicklog)

         write("\r\n"..user.sName.."|"..Reason.."|"..path.."|"..kick[user.sName].."|"..GetTime())

         writeto()

         if (main == "Active" ) then

            SendToAll(BotName, "The user "..user.sName.." is been kicked for "..Reason)

         end

         if (main == "Deactive") then

            return 1

         end

         user:TempBan()

      elseif (warn[user.sName] == 0 or warn[user.sName] == 1 or warn[user.sName] == 2) then

         ClearNill(user)

         warn[user.sName] = warn[user.sName] + 1

         Reason = FindWhat(data)

         SendPmToNick("Prtjoe", BotName, "*** User "..user.sName.." got "..warn[user.sName].." warns. Reason: "..Reason.." FILE: "..path)

         user:SendPM(BotName, "You have been warned "..warn[user.sName].." time(s) at 3 you will be kicked. "..Reason.." FILE: "..path)

         user:SendPM(BotName, "You can come back when you have corrected the problem")

         user:SendPM(BotName, "Disconnected...")

         user:Disconnect()

      end

   elseif not(user.bOperator and GetProfileName(user.iProfile) == "VIP" and user.sName == usersimune) then --this will solve the double log i think

      if (kick[user.sName] == 3) then

         ClearNill(user)

         kick[user.sName] = kick[user.sName] + 1

         Reason = FindWhat(data)

         SendPmToNick("Prtjoe", BotName, "*** User "..user.sName.." got ban. Reason: "..Reason.." FILE: "..path)

         user:SendPM(BotName,"You have been banned. "..Reason)

         if (main == "Active" ) then

            SendToAll(BotName, "The user "..user.sName.." is been banned for "..Reason)

         end

         if (main == "Deactive") then

            return 1

         end

         user:Ban()

      elseif (kick[user.sName] == 0 or kick[user.sName] == 1 or kick[user.sName] == 2) then

         ClearNill(user)

         kick[user.sName] = kick[user.sName] + 1

         user:SendData(Bot, kick[user.sName])

         Reason = FindWhat(data)

         SendPmToNick("Prtjoe", BotName, "*** User "..user.sName.." got "..kick[user.sName].." kicks. Reason: "..Reason.." FILE: "..path)

         user:SendPM(BotName,"You have been kicked "..kick[user.sName].." time(s) at 3 you will be ban. "..Reason.." FILE: "..path)

         appendto(kicklog)

         write("\r\n"..user.sName.."|"..Reason.."|"..path.."|"..kick[user.sName].."|"..GetTime())

         writeto()

         if (main == "Active" ) then

            SendToAll(BotName, "The user "..user.sName.." is been kicked for "..Reason)

         end

         if (main == "Deactive") then

            return 1

         end

         user:TempBan()

      end

   end

end

end

end



function FindWhat(data)

for i,v in Files do

if( strfind(strlower(data), i) ) then

return v

end

end

return "Other files"
end  



function GetTime()

   s = date("%S")

   h = date("%H")

   m = date("%M")

   d = date("%d")

   mm = date("%m")

   y = date("%y")

   Date = "Day: "..d.."/"..mm.."/20"..y.." Hour: "..h..":"..m..":"..s

   return Date



end



function ClearNill(user)

   if (warn[user.sName] == nil) then

      warn[user.sName] = 0

   end

   if (kick[user.sName] == nil) then

      kick[user.sName] = 0

   end

end

BottledHate

This is an edit on the very last one from nErBoS... i changed everthing to be saved to one table.. which is saved to a file... and loaded on start.. so kick/warn counts are saved between hub restarts.  I don't have ptokx myself.. so i can't really test this.  If it doesn't work it could be that a) nErBoS messed up, or b) i messed up... if it was me sorry.

nErBoS:
maybe u can tweak a lil from here to get the lil typos n stuff out i made/missed.....

i was bored!:

-- Simple Illegalist v0.1 
-- Created by Ptaczek, Jan-3, 2003 
-- Searches for specified patterns. Useful for illegal share checking 
-- some changes by Skippy and RabidWombat and OpiumVolage and trucker 
-- add tables warn and kick by nErBoS

BotName = "Illegalist" 

function Main()
frmHub:RegBot(BotName) 
frmHub:EnableSearchData(1) 
end 

Files = { 
["childsex"]="NO sick Porn inhere!", 
["childporn"]="NO sick kid Porn inhere!", 
["underage"]="NO sick kid Porn inhere!", 
["animalsex"]="NO Animalsex files here!", 
["svastika"]="NO Nazi/white power music HERE!!!", 
[".temp.mp3"]="NO sharing of incomplete downloads", 
["_INCOMPLETE_"]="NO sharing of incomplete downloads", 
["download123456789.dat"]="NO sharing of incomplete downloads", 
["part.met"]="NO sharing of incomplete downloads", 
[".getright"]="NO sharing of incomplete downloads", 
[".vob"]="NO sharing of incomplete downloads", 
["share faker"]="NO tools for fake sharing allowed", 
["share hacker"]="No tools for fake sharing allowed"} 

--warn = {}
--kick = {}
saveData = { } 
usersimune = {"nErBoS", "[NL]trucker","(uk-kingdom)John","(UKD)John","[NL]{VIP}Geroni", 
"[NL]Coco","[NL]Dark_bad_girl","[NL]DiGARiX","[NL]GePe","[NL]M@non","[NL]movieman","[NL]SuusTweety", 
"[NL]voodoo","[NL]ZeroX","Chupi?","DoJiN","hhps","[UKD]jiorgee","Quaraf","Sweet_Bitch", 
"TheWickedRabbit","Serima","[NL]partyfever","[NL]AiR"} -- Usres you want to not be checked 
--log

--kicklog = "kicks.txt" -- In script folder
main = "Active" --- write Deactive and will not send the kicks and bans to the main
-----------//////////////////////////////////////------------------------------------------------------
kickLogNew = "_Kick Log.txt"
function Serialize(tTable, sTableName, hFile, sTab)
	assert(tTable, "tTable equals nil");
	assert(sTableName, "sTableName equals nil");
	assert(hFile, "hFile equals nil");
	assert(type(tTable) == "table", "tTable must be a table!");
	assert(type(sTableName) == "string", "sTableName must be a string!");
	sTab = sTab or "";
	write(hFile, sTab..sTableName.." ={\n" );
	for key, value in tTable do
		local sKey = (type(key) == "string") and format("[%q]",key) or format("[%d]",key);
		if(type(value) == "table") then
			Serialize(value, sKey, hFile, sTab.."\t");
		else
			local sValue = (type(value) == "string") and format("%q",value) or tostring(value);
			write(hFile, sTab.."\t"..sKey.." = "..sValue);
		end
		write(hFile, ",\n");
	end
	write(hFile, sTab.."}");
end
function SaveToFile(file , table , tablename)
	local hFile = openfile(file, "w");
	Serialize(table, tablename, hFile);
	closefile(hFile);
end
function LoadFromFile (file)
	assert(readfrom(file),file.." is not found.Generating new "..file..". All is fine. Don't panic.")
	dostring(read("*all"))
	readfrom()
end
function saveLogData(t,n,i,r,p,a)
   if saveData[n] then
      saveData[n][t] = {}
   else
      saveData[n] = {}
      saveData[n][t] = {}
   end
   saveData[n][t] = {
   ["IP"] = i,
   ["REASON"] = r,
   ["Path"] = p,
   ["ACTION"] = a
      }
   Serialize(saveData, "saveData", kickLogNew)
end
function saveKickCount(n,kC,wC)
   if not saveData[user.sName] then
      saveData[user.sName] = {}
   end
   if wC == "" then
      saveData[user.sName]["KickCount"] = kC
      Serialize(saveData, "saveData", kickLogNew)
   else
      saveData[user.sName]["WarnCount"] = wC
      Serialize(saveData, "saveData", kickLogNew)
   end
end

LoadFromFile(kickLogNew)
-----------//////////////////////////////////////------------------------------------------------------

function NewUserConnected(user)
   if not saveData[user.sName] then
      saveData[user.sName] = {}
   end
   if (saveData[user.sName]["WarnCount"] == nil or saveData[user.sName]["WarnCount"] == 4) then 
      saveData[user.sName]["WarnCount"] = 0
      saveKickCount(user.sName,0,"")
   end
   if (saveData[user.sName]["KickCount"] == nil or saveData[user.sName]["KickCount"] == 4) then
      saveData[user.sName]["WarnCount"] = 0
      saveKickCount(user.sName,"",0)
   end
   for i,v in Files do 
      user:SendData("$Search Hub:"..BotName.." F?F?0?1?"..i) 
   end 
end 

function DataArrival(user, data)
-----------//////////////////////////////////////------------------------------------------------------
local timeNow = GetTime() --//ths will prevent double entries for the same kick even if the script i plugged this into tries.
-----------//////////////////////////////////////------------------------------------------------------
if( strsub(data, 1, 3) == "$SR" ) then 
_,_,nick = strfind( data, "\05(%S*)|$" )
local s,e,path = strfind(data, "$SR%s+%S+%s+(.+)%x+%s+%x+/%x+")
if( nick == BotName) then
	for i=1,getn(usersimune) do 
	if (user.bOperator or user.sName == usersimune[i]) then
	return 1
	end
	end
	if (GetProfileName(user.iProfile) == "VIP") then
		if (saveData[user.sName]["KickCount"] == 3) then
			ClearNill(user)
			saveData[user.sName]["KickCount"] = saveData[user.sName]["KickCount"] + 1
         saveKickCount(user.sName, 4,"")
			Reason = FindWhat(data) 
			SendPmToNick("[NL]trucker", BotName, "*** User "..user.sName.." got ban. Reason: "..Reason.." FILE: "..path) 
			user:SendPM(BotName,"You have been banned. "..Reason)
			if (main == "Active" ) then
				SendToAll(BotName, "The user "..user.sName.." is been banned for "..Reason)
			end
			if (main == "Deactive") then
				return 1
			end
			user:Ban() 
		elseif (saveData[user.sName]["WarnCount"] == 3 or saveData[user.sName]["KickCount"] == 1 or saveData[user.sName]["KickCount"] == 2) then
			ClearNill(user)
			saveData[user.sName]["WarnCount"] = saveData[user.sName]["WarnCount"] + 1
			saveData[user.sName]["KickCount"] = saveData[user.sName]["KickCount"] + 1
         saveKickCount(user.sName, saveData[user.sName]["KickCount"],"")
         saveKickCount(user.sName, "",saveData[user.sName]["WarnCount"])
			Reason = FindWhat(data) 
			SendPmToNick("[NL]trucker", BotName, "*** User "..user.sName.." got "..saveData[user.sName]["KickCount"].." kicks. Reason: "..Reason.." FILE: "..path) 
			user:SendPM(BotName,"You have been kicked "..saveData[user.sName]["KickCount"].." time(s) at 3 you will be ban. "..Reason.." FILE: "..path)
			--appendto(kicklog)
-----------------------------------//only thing i don't konw werks is user.sIP... i'm not a ptokax sciptor..
         saveLogData(timeNow, user.sName, user.sIP, Reason, path, "Temp Ban")
-----------//////////////////////////////////////------------------------------------------------------
			--write("\r\n"..user.sName.."|"..Reason.."|"..path.."|"..kick[user.sName].."|"..GetTime()) 
			--writeto()
			if (main == "Active" ) then
				SendToAll(BotName, "The user "..user.sName.." is been kicked for "..Reason)
			end
			if (main == "Deactive") then
				return 1
			end
			user:TempBan() 
		elseif (saveData[user.sName]["WarnCount"] == 0 or saveData[user.sName]["WarnCount"] == 1 or saveData[user.sName]["WarnCount"] == 2) then
			ClearNill(user)
			saveData[user.sName]["WarnCount"] = saveData[user.sName]["WarnCount"] + 1
         saveKickCount(user.sName, "",saveData[user.sName]["WarnCount"])
			Reason = FindWhat(data) 
			SendPmToNick("[NL]trucker", BotName, "*** User "..user.sName.." got "..saveData[user.sName]["WarnCount"].." warns. Reason: "..Reason.." FILE: "..path) 
			user:SendPM(BotName, "You have been warned "..saveData[user.sName]["WarnCount"].." time(s) at 3 you will be kicked. "..Reason.." FILE: "..path)
			user:SendPM(BotName, "You can come back when you have corrected the problem")
			user:SendPM(BotName, "Disconnected...")
         -----------------------------------//only thing i don't konw werks is user.sIP... i'm not a ptokax sciptor..
         saveLogData(timeNow, user.sName, user.sIP, Reason, path, "Disconnect")
-----------//////////////////////////////////////------------------------------------------------------        
			user:Disconnect() 
		end
	elseif not(user.bOperator and GetProfileName(user.iProfile) == "VIP" and user.sName == usersimune[i]) then --this will solve the double log i think
		if (saveData[user.sName]["KickCount"] == 3) then
			ClearNill(user)
			saveData[user.sName]["KickCount"] = saveData[user.sName]["KickCount"] + 1
         saveKickCount(user.sName, saveData[user.sName]["KickCount"],"")
			Reason = FindWhat(data) 
			SendPmToNick("[NL]trucker", BotName, "*** User "..user.sName.." got ban. Reason: "..Reason.." FILE: "..path) 
			user:SendPM(BotName,"You have been banned. "..Reason)
			if (main == "Active" ) then
				SendToAll(BotName, "The user "..user.sName.." is been banned for "..Reason)
			end
			if (main == "Deactive") then
				return 1
			end
         -----------------------------------//only thing i don't konw werks is user.sIP... i'm not a ptokax sciptor..
         saveLogData(timeNow, user.sName, user.sIP, Reason, path, "Ban")
-----------//////////////////////////////////////------------------------------------------------------
			user:Ban() 
		elseif (saveData[user.sName]["KickCount"] == 0 or saveData[user.sName]["KickCount"] == 1 or saveData[user.sName]["KickCount"] then
			ClearNill(user)
			saveData[user.sName]["KickCount"] = saveData[user.sName]["KickCount"] + 1
         saveKickCount(user.sName, saveData[user.sName]["KickCount"],"")
			user:SendData(Bot, saveData[user.sName]["KickCount"])
			Reason = FindWhat(data) 
			SendPmToNick("[NL]trucker", BotName, "*** User "..user.sName.." got "..saveData[user.sName]["KickCount"].." kicks. Reason: "..Reason.." FILE: "..path) 
			user:SendPM(BotName,"You have been kicked "..saveData[user.sName]["KickCount"].." time(s) at 3 you will be ban. "..Reason.." FILE: "..path)
			--appendto(kicklog) 
         -----------------------------------//only thing i don't konw werks is user.sIP... i'm not a ptokax sciptor..
         saveLogData(timeNow, user.sName, user.sIP, Reason, path, "Temp Ban")
-----------//////////////////////////////////////------------------------------------------------------		
         --write("\r\n"..user.sName.."|"..Reason.."|"..path.."|"..kick[user.sName].."|"..GetTime()) 
			--writeto()
			if (main == "Active" ) then
				SendToAll(BotName, "The user "..user.sName.." is been kicked for "..Reason)
			end
			if (main == "Deactive") then
				return 1
			end
			user:TempBan() 
		end
	end
end 
end
end 

function FindWhat(data) 
for i,v in Files do 
if( strfind(strlower(data), i) ) then 
return v 
end 
end 
return "Other files" 
end  

function GetTime()
	s = date("%S")
	h = date("%H")
	m = date("%M")
	d = date("%d")
	mm = date("%m")
	y = date("%y")
	Date = "Day: "..d.."/"..mm.."/20"..y.." Hour: "..h..":"..m..":"..s
	return Date

end

function ClearNill(user)
	if (saveData[user.sName]["WarnCount"] == nil) then 
		saveData[user.sName]["WarnCount"] = 0
	end
	if (saveData[user.sName]["KickCount"] == nil) then
		saveData[user.sName]["KickCount"] = 0
	end
end

looks like titmouse f'd up the tabbing a lil.. oh well.

-?H
Homepage: www.bottledhate.webhop.org

Compiling  Lua scripts is LAME!!!!!

prtjoe

can some1 help me with my last post

SMF spam blocked by CleanTalk