PtokaX forum

Archive => Archived 4.0 boards => Request for Lua 4 scripts => Topic started by: [NL]trucker on 12 February, 2004, 09:46:49

Title: a little modification please
Post by: [NL]trucker on 12 February, 2004, 09:46:49
hello all

i use ilegalist to check on my users but i have a request
could it be modified

a:so that i can set wheter to check a profile or not
b: and that i have the choice between kick and warn
pro profile
c: that 3x kick means ban
d: that 3x warn means kick
e: that it logs it,s kicks and warns

this is my profile list:

0|Owner|
1|Master|
2|Admin|
3|Moderator|
4|Operator|
5|VIP|
6|Reg|
7|Magmar|

this is my script now:

- 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

BotName = "Illegalist"

function Main()
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"}
 

Kicked = {}

function NewUserConnected(user)
if( Kicked[user.sName] == 1 ) then
Kicked[user.sName] = nil
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*)|$" )
if( nick == BotName and Kicked[user.sName] == nil ) then
Kicked[user.sName] = 1
Reason = FindWhat(data)
SendPmToNick("[NL]trucker", BotName, "*** User "..user.sName.." kicked. Reason: "..Reason)
user:SendPM((BotName),( "You were kicked. "..Reason),("You can come back when you have corrected the problem"))
user:Disconnect()
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

Title:
Post by: nErBoS on 12 February, 2004, 11:31:56
Hi,

This script doesn't check on ops, which leaves us with this levels..

5|VIP|
6|Reg|
7|Magmar|  --Not sure about this one

Now tell me which level you want to script to not check and which level to kick or warn.

Best regrads, nErBoS
Title:
Post by: [NL]trucker on 12 February, 2004, 16:25:15
nerbos


vip= warn  3x warn = kick after 3x kick = tempban\ban
reg= check and kick 3x kick = ban
magmar= nocheck = own profile for hubowmers in network
user =check and kick 3x kixk =ban

and please dont forget this one

That it logs it,s kicks and warns  this is important to me
something like userx is warned because ....
                        userx is 2 x warned
                        userx is 3 times warned and got kicked
                        userx is 3 xkicked and got banned                                                                                                                  for not listening bye bye

and if posibble same mesaage in main.

go for it m8 i know you can do this :-)
Title:
Post by: nErBoS on 14 February, 2004, 01:38:41
Hi,

Sorry for the delay i have been having a lot of work...

Hope it helps...

-- 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!",
["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 = {}


function NewUserConnected(user)
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*)|$" )
if( nick == BotName) then
if (user.bOperator) then
return 1
elseif (GetProfileName(user.iProfile) == "VIP") then
if (warn[user.sName] == nill or warn[user.sName] == 1 or warn[user.sName] == 2) then
warn[user.sName] = warn[user.sName] + 1
Reason = FindWhat(data)
SendPmToNick("[NL]trucker", BotName, "*** User "..user.sName.." got "..warn[user.sName].." warns. Reason: "..Reason)
user:SendPM((BotName),( "You have been warned "..warn[user.sName].." time(s) at 4 you will be kicked. "..Reason),("You can come back when you have corrected the problem"))
user:SendPM(BotName, "Disconnected...")
user:Disconnect()
elseif (warn[user.sName] == 3 or kick[user.sName] == 1 or kick[user.sName] == 2) then
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)
user:SendPM(BotName,"You have been kicked "..kick[user.sName].." time(s) at 3 you will be ban. "..Reason)
user:TempBan()
elseif (kick[user.sName] == 3) then
Reason = FindWhat(data)
SendPmToNick("[NL]trucker", BotName, "*** User "..user.sName.." got ban. Reason: "..Reason)
user:SendPM(BotName,"You have been banned. "..Reason)
user:Ban()
end
end
else
if (kick[user.sName] == nill or kick[user.sName] == 1 or kick[user.sName] == 2) then
kick[user.sName] = kick[user.sName] + 1
Reason = FindWhat(data)
SendPmToNick("[NL]trucker", BotName, "*** User "..user.sName.." got "..kick[user.sName].." kicks. Reason: "..Reason)
user:SendPM(BotName,"You have been kicked "..kick[user.sName].." time(s) at 3 you will be ban. "..Reason)
user:TempBan()
elseif (kick[user.sName] == 3) then
Reason = FindWhat(data)
SendPmToNick("[NL]trucker", BotName, "*** User "..user.sName.." got ban. Reason: "..Reason)
user:SendPM(BotName,"You have been banned. "..Reason)
user:Ban()
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  

NOTE: When Hub or script is restarted the warns and kicks turns to nill in the next version of ptokax this will be resolved :) with the function OnExit()

Also first time i use tables anything wrong just report :)

Best regards, nErBoS
Title:
Post by: [NL]trucker on 14 February, 2004, 17:34:43
Nerbos

is it logging the kicks ?
and so yes do i need to make a dir and txt file for it ?

QuoteThat it logs it,s kicks and warns this is important to me
something like userx is warned because ....
userx is 2 x warned
userx is 3 times warned and got kicked
userx is 3 xkicked and got banned for not listening bye bye

and if posibble same mesaage in main.
Title:
Post by: [NL]trucker on 14 February, 2004, 17:44:09
Nerbos

oke first message i got right after restart of scripts

Syntax error: attempt to perform arithmetic on a nil value
stack traceback:
   1:  function `DataArrival' at line 68 [file `D:\==PTOTAX==\gekkobeta5\scripts\kick-bot.lua']

and forget to ask can you make a immune list?

i mean where i can add users that dont get checked?
Title:
Post by: nErBoS on 14 February, 2004, 22:48:07
Hi,

Try 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: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"} -- Usres you want to not be checked


function NewUserConnected(user)
if (warn[user.sName] == nill) then -- this will solve the nill problem i think
warn[user.sName] = 0
end
if (kick[user.sName] == nill) 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*)|$" )
if( nick == BotName) then
for i=1,getn(usersimune) do
if (user.bOperator or user.sName == usersimune[i]) then
return 1
elseif (GetProfileName(user.iProfile) == "VIP") then
if (warn[user.sName] == nill or warn[user.sName] == 1 or warn[user.sName] == 2) then
warn[user.sName] = warn[user.sName] + 1
Reason = FindWhat(data)
SendPmToNick("[NL]trucker", BotName, "*** User "..user.sName.." got "..warn[user.sName].." warns. Reason: "..Reason)
user:SendPM((BotName),( "You have been warned "..warn[user.sName].." time(s) at 4 you will be kicked. "..Reason),("You can come back when you have corrected the problem"))
user:SendPM(BotName, "Disconnected...")
user:Disconnect()
elseif (warn[user.sName] == 3 or kick[user.sName] == 1 or kick[user.sName] == 2) then
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)
user:SendPM(BotName,"You have been kicked "..kick[user.sName].." time(s) at 3 you will be ban. "..Reason)
user:TempBan()
elseif (kick[user.sName] == 3) then
Reason = FindWhat(data)
SendPmToNick("[NL]trucker", BotName, "*** User "..user.sName.." got ban. Reason: "..Reason)
user:SendPM(BotName,"You have been banned. "..Reason)
user:Ban()
end
end
end
else
if (kick[user.sName] == nill or kick[user.sName] == 1 or kick[user.sName] == 2) then
kick[user.sName] = kick[user.sName] + 1
Reason = FindWhat(data)
SendPmToNick("[NL]trucker", BotName, "*** User "..user.sName.." got "..kick[user.sName].." kicks. Reason: "..Reason)
user:SendPM(BotName,"You have been kicked "..kick[user.sName].." time(s) at 3 you will be ban. "..Reason)
user:TempBan()
elseif (kick[user.sName] == 3) then
Reason = FindWhat(data)
SendPmToNick("[NL]trucker", BotName, "*** User "..user.sName.." got ban. Reason: "..Reason)
user:SendPM(BotName,"You have been banned. "..Reason)
user:Ban()
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  


What do you want to log on the kicks.txt ?? (reason, user name, times kicked.. ??)

Best regards, nErBoS
Title:
Post by: [NL]trucker on 14 February, 2004, 23:13:19
nerbos

 i will try this one out :-)

QuoteWhat do you want to log on the kicks.txt ?? (reason, user name, times kicked.. ??)

yep and if possible time and date.
Title:
Post by: [NL]trucker on 14 February, 2004, 23:25:23
Nerbos

next one :-)

Syntax error: attempt to perform arithmetic on a nil value
stack traceback:
   1:  function `DataArrival' at line 79 [file `D:\==PTOTAX==\gekkobeta5\scripts\kick-bot.lua']

Script stopped.


have fun peoplle say sometimes :p
Title:
Post by: nErBoS on 14 February, 2004, 23:29:39
Hi,

Hope it helps..

-- 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!",
["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"} -- Usres you want to not be checked
kicklog = "kicks.txt" -- In script folder


function NewUserConnected(user)
if (warn[user.sName] == nill) then -- this will solve the nill problem i think
warn[user.sName] = 0
end
if (kick[user.sName] == nill) 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*)|$" )
if( nick == BotName) then
for i=1,getn(usersimune) do
if (user.bOperator or user.sName == usersimune[i]) then
return 1
elseif (GetProfileName(user.iProfile) == "VIP") then
if (warn[user.sName] == nill or warn[user.sName] == 1 or warn[user.sName] == 2) then
warn[user.sName] = warn[user.sName] + 1
Reason = FindWhat(data)
SendPmToNick("[NL]trucker", BotName, "*** User "..user.sName.." got "..warn[user.sName].." warns. Reason: "..Reason)
user:SendPM((BotName),( "You have been warned "..warn[user.sName].." time(s) at 4 you will be kicked. "..Reason),("You can come back when you have corrected the problem"))
user:SendPM(BotName, "Disconnected...")
user:Disconnect()
elseif (warn[user.sName] == 3 or kick[user.sName] == 1 or kick[user.sName] == 2) then
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)
user:SendPM(BotName,"You have been kicked "..kick[user.sName].." time(s) at 3 you will be ban. "..Reason)
appendto(kick)
write("\r\n"..user.sName.."|"..Reason.."|"..kick[user.sName].."|"..GetTime())
writeto()
user:TempBan()
elseif (kick[user.sName] == 3) then
Reason = FindWhat(data)
SendPmToNick("[NL]trucker", BotName, "*** User "..user.sName.." got ban. Reason: "..Reason)
user:SendPM(BotName,"You have been banned. "..Reason)
user:Ban()
end
end
end
else
if (kick[user.sName] == nill or kick[user.sName] == 1 or kick[user.sName] == 2) then
kick[user.sName] = kick[user.sName] + 1
Reason = FindWhat(data)
SendPmToNick("[NL]trucker", BotName, "*** User "..user.sName.." got "..kick[user.sName].." kicks. Reason: "..Reason)
user:SendPM(BotName,"You have been kicked "..kick[user.sName].." time(s) at 3 you will be ban. "..Reason)
appendto(kick)
write("\r\n"..user.sName.."|"..Reason.."|"..kick[user.sName].."|"..GetTime())
writeto()
user:TempBan()
user:TempBan()
elseif (kick[user.sName] == 3) then
Reason = FindWhat(data)
SendPmToNick("[NL]trucker", BotName, "*** User "..user.sName.." got ban. Reason: "..Reason)
user:SendPM(BotName,"You have been banned. "..Reason)
user:Ban()
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

Best regards, nErBoS
Title:
Post by: [NL]trucker on 15 February, 2004, 13:14:46
nerbos

as soon i started the script i got this :

Syntax error: attempt to perform arithmetic on a nil value
stack traceback:
   1:  function `DataArrival' at line 83 [file `D:\==PTOTAX==\gekkobeta5\scripts\kick-bot.lua']

i saw you added a log to it :-)

do i need to make the txt files and the dir myself?

and i saw the time bit in the script is this included in the txt file?

hope you know what i mean :-)

something like 12.30 user x is kicked for ......
                        12.40  user x is kicked for second time for ....
Title:
Post by: nErBoS on 15 February, 2004, 14:40:55
Hi,

I have tested the script and i'm not having that error

little modification..

-- 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"} -- Usres you want to not be checked
kicklog = "kicks.txt" -- In script folder


function NewUserConnected(user)
if (warn[user.sName] == nill) then -- this will solve the nill problem i think
warn[user.sName] = 0
end
if (kick[user.sName] == nill) 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*)|$" )
if( nick == BotName) then
for i=1,getn(usersimune) do
if (user.bOperator or user.sName == usersimune[i]) then
return 1
elseif (GetProfileName(user.iProfile) == "VIP") then
if (warn[user.sName] == 0 or warn[user.sName] == 1 or warn[user.sName] == 2) then
warn[user.sName] = warn[user.sName] + 1
Reason = FindWhat(data)
SendPmToNick("[NL]trucker", BotName, "*** User "..user.sName.." got "..warn[user.sName].." warns. Reason: "..Reason)
user:SendPM(BotName, "You have been warned "..warn[user.sName].." time(s) at 3 you will be kicked. "..Reason)
user:SendPM(BotName, "You can come back when you have corrected the problem")
user:SendPM(BotName, "Disconnected...")
user:Disconnect()
elseif (warn[user.sName] == 3 or kick[user.sName] == 1 or kick[user.sName] == 2) then
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)
user:SendPM(BotName,"You have been kicked "..kick[user.sName].." time(s) at 3 you will be ban. "..Reason)
appendto(kicklog)
write("\r\n"..user.sName.."|"..Reason.."|"..kick[user.sName].."|"..GetTime())
writeto()
user:TempBan()
elseif (kick[user.sName] == 3) then
Reason = FindWhat(data)
SendPmToNick("[NL]trucker", BotName, "*** User "..user.sName.." got ban. Reason: "..Reason)
user:SendPM(BotName,"You have been banned. "..Reason)
user:Ban()
end
elseif ( not user.bOperator ) then
if (kick[user.sName] == 0 or kick[user.sName] == 1 or kick[user.sName] == 2) then
kick[user.sName] = kick[user.sName] + 1
Reason = FindWhat(data)
SendPmToNick("[NL]trucker", BotName, "*** User "..user.sName.." got "..kick[user.sName].." kicks. Reason: "..Reason)
user:SendPM(BotName,"You have been kicked "..kick[user.sName].." time(s) at 3 you will be ban. "..Reason)
appendto(kicklog)
write("\r\n"..user.sName.."|"..Reason.."|"..kick[user.sName].."|"..GetTime())
writeto()
user:TempBan()
elseif (kick[user.sName] == 3) then
Reason = FindWhat(data)
SendPmToNick("[NL]trucker", BotName, "*** User "..user.sName.." got ban. Reason: "..Reason)
user:SendPM(BotName,"You have been banned. "..Reason)
user:Ban()
end
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

The kick.txt will auto be created in the script folder and will save this information...

teste|NO sick Porn inhere!|1|Day: 15/02/2004 Hour: 13:36:15

Best regards, nErBoS
Title:
Post by: [NL]trucker on 15 February, 2004, 22:00:41
Nerbos

thnx m8 i,m testing it now ;-)

will let you know how it goes .
Title:
Post by: [NL]trucker on 15 February, 2004, 22:14:41
nerbos

script is working fine :-)

just the kick-count

(NL)renoreno|NO sharing of incomplete downloads|1|Day: 15/02/2004 Hour: 22:03:30

(NL)renoreno|NO sharing of incomplete downloads|2|Day: 15/02/2004 Hour: 22:03:30

mari|NO sharing of incomplete downloads|1|Day: 15/02/2004 Hour: 22:05:47

mari|NO sharing of incomplete downloads|2|Day: 15/02/2004 Hour: 22:05:47

it is counting doublle (:-
Title:
Post by: nErBoS on 16 February, 2004, 00:18:37
Yes the log will put all kicks.

You want to each user have their one line ??? its more dificult

Best regards, nErBoS
Title:
Post by: NightLitch on 16 February, 2004, 00:26:34
A hint. Make it a table saving. then everytime a new line come it will overwrite the old one.

some advanced saving. but the best I think. thx to Wombat.

do it like this when saving:

table[nick] = {
                      ["IP"] = nick.sIP
                      ["REASON"] = reason,
                      ["TIME"] = GetTime,
                      ["byOP"] = curUser.sName
                     }

and call it with this:

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

ex. on SaveToFile & Loading:

SaveToFile(KickFile,KickTable,"KickTable")

LoadFromFile(KickFile)

and when opening the in script for viewing:
( put in a function and see what it does )
local tmp = table[curUser.sName]
if tmp then
local IP = tmp["IP"]
local REASON = tmp["REASON"]
local TIME = tmp["TIME"]
local BYOP = tmp["byOP"]
end

Msg = "Nick: "..tmp..", IP: "..IP..", Reason: "..REASON..", Time: "..TIME..", By OP: "..BYOP.."."
SendToAll(Msg)

hope this help some.

otherwise I can fix it later.
Title:
Post by: [NL]trucker on 16 February, 2004, 08:32:55
Nerbos

script is still working fine :-)

(NL)renoreno|NO sharing of incomplete downloads|1|Day: 15/02/2004 Hour: 22:03:30

(NL)renoreno|NO sharing of incomplete downloads|2|Day: 15/02/2004 Hour: 22:03:30

look at the times of the kick it counts 1 kick as 2

that whas what i ment.

Now for a bit more difficult request

could the kicks and bans also be shown in main?
with the possibility to switch on/of the message in main?

this script is getting better and better by the day great work m8 and thanks for doing it .

Nightlitch

this is just an autokick script ; but i like the idear that it logs also the kicks by the OP,s


table[nick] = {
                      ["IP"] = nick.sIP
                      ["REASON"] = reason,
                      ["TIME"] = GetTime,
                      ["byOP"] = curUser.sName
                     }

or is my thought wrong with this?
Title:
Post by: nErBoS on 16 February, 2004, 13:34:58
Hi,

Try 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"} -- 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] == nill) then -- this will solve the nill problem i think
warn[user.sName] = 0
end
if (kick[user.sName] == nill) 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*)|$" )
if( nick == BotName) then
for i=1,getn(usersimune) do
if (user.bOperator or user.sName == usersimune[i]) then
return 1
elseif (GetProfileName(user.iProfile) == "VIP") then
if (warn[user.sName] == 0 or warn[user.sName] == 1 or warn[user.sName] == 2) then
warn[user.sName] = warn[user.sName] + 1
Reason = FindWhat(data)
SendPmToNick("[NL]trucker", BotName, "*** User "..user.sName.." got "..warn[user.sName].." warns. Reason: "..Reason)
user:SendPM(BotName, "You have been warned "..warn[user.sName].." time(s) at 3 you will be kicked. "..Reason)
user:SendPM(BotName, "You can come back when you have corrected the problem")
user:SendPM(BotName, "Disconnected...")
user:Disconnect()
elseif (warn[user.sName] == 3 or kick[user.sName] == 1 or kick[user.sName] == 2) then
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)
user:SendPM(BotName,"You have been kicked "..kick[user.sName].." time(s) at 3 you will be ban. "..Reason)
appendto(kicklog)
write("\r\n"..user.sName.."|"..Reason.."|"..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 (kick[user.sName] == 3) then
Reason = FindWhat(data)
SendPmToNick("[NL]trucker", BotName, "*** User "..user.sName.." got ban. Reason: "..Reason)
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()
end
elseif ( not user.bOperator and not GetProfileName(user.iProfile) == "VIP" and not user.sName == usersimune[i]) then --this will solve the double log i think
if (kick[user.sName] == 0 or kick[user.sName] == 1 or kick[user.sName] == 2) then
kick[user.sName] = kick[user.sName] + 1
Reason = FindWhat(data)
SendPmToNick("[NL]trucker", BotName, "*** User "..user.sName.." got "..kick[user.sName].." kicks. Reason: "..Reason)
user:SendPM(BotName,"You have been kicked "..kick[user.sName].." time(s) at 3 you will be ban. "..Reason)
appendto(kicklog)
write("\r\n"..user.sName.."|"..Reason.."|"..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 (kick[user.sName] == 3) then
Reason = FindWhat(data)
SendPmToNick("[NL]trucker", BotName, "*** User "..user.sName.." got ban. Reason: "..Reason)
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()
end
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


Thanks NigthLitch for the information how to work with tables, have to get a litlle time free to start working on that, is very useful.

Best regards, nErBoS
Title:
Post by: WickeD on 16 February, 2004, 18:44:52
QuoteOriginally posted by nErBoS
Hi,

Try 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"} -- 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] == nill) then -- this will solve the nill problem i think
warn[user.sName] = 0
end
if (kick[user.sName] == nill) 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*)|$" )
if( nick == BotName) then
for i=1,getn(usersimune) do
if (user.bOperator or user.sName == usersimune[i]) then
return 1
elseif (GetProfileName(user.iProfile) == "VIP") then
if (warn[user.sName] == 0 or warn[user.sName] == 1 or warn[user.sName] == 2) then
warn[user.sName] = warn[user.sName] + 1
Reason = FindWhat(data)
SendPmToNick("[NL]trucker", BotName, "*** User "..user.sName.." got "..warn[user.sName].." warns. Reason: "..Reason)
user:SendPM(BotName, "You have been warned "..warn[user.sName].." time(s) at 3 you will be kicked. "..Reason)
user:SendPM(BotName, "You can come back when you have corrected the problem")
user:SendPM(BotName, "Disconnected...")
user:Disconnect()
elseif (warn[user.sName] == 3 or kick[user.sName] == 1 or kick[user.sName] == 2) then
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)
user:SendPM(BotName,"You have been kicked "..kick[user.sName].." time(s) at 3 you will be ban. "..Reason)
appendto(kicklog)
write("\r\n"..user.sName.."|"..Reason.."|"..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 (kick[user.sName] == 3) then
Reason = FindWhat(data)
SendPmToNick("[NL]trucker", BotName, "*** User "..user.sName.." got ban. Reason: "..Reason)
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()
end
elseif ( not user.bOperator and not GetProfileName(user.iProfile) == "VIP" and not user.sName == usersimune[i]) then --this will solve the double log i think
if (kick[user.sName] == 0 or kick[user.sName] == 1 or kick[user.sName] == 2) then
kick[user.sName] = kick[user.sName] + 1
Reason = FindWhat(data)
SendPmToNick("[NL]trucker", BotName, "*** User "..user.sName.." got "..kick[user.sName].." kicks. Reason: "..Reason)
user:SendPM(BotName,"You have been kicked "..kick[user.sName].." time(s) at 3 you will be ban. "..Reason)
appendto(kicklog)
write("\r\n"..user.sName.."|"..Reason.."|"..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 (kick[user.sName] == 3) then
Reason = FindWhat(data)
SendPmToNick("[NL]trucker", BotName, "*** User "..user.sName.." got ban. Reason: "..Reason)
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()
end
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


Thanks NigthLitch for the information how to work with tables, have to get a litlle time free to start working on that, is very useful.

Best regards, nErBoS

Can you fix this fine script so when a user get a warn/kick/ban it shows this info to!: Movies/Mixed-Movies/Animalsex.avi

So the script shows where the bad-files are in the users share!

//WickeD
Title:
Post by: nErBoS on 17 February, 2004, 00:57:12
Hi,

Done..

-- 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 = {
[".dll"]="NO sick Porn inhere!",
["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"} -- 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] == nill) then -- this will solve the nill problem i think
warn[user.sName] = 0
end
if (kick[user.sName] == nill) 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+") - 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
elseif (GetProfileName(user.iProfile) == "VIP") then
if (warn[user.sName] == 0 or warn[user.sName] == 1 or warn[user.sName] == 2) then
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()
elseif (warn[user.sName] == 3 or kick[user.sName] == 1 or kick[user.sName] == 2) then
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.."|"..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 (kick[user.sName] == 3) then
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()
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] == 0 or kick[user.sName] == 1 or kick[user.sName] == 2) then
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.."|"..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 (kick[user.sName] == 3) then
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()
end
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

Best regards, nErBoS
Title:
Post by: [NL]trucker on 17 February, 2004, 13:03:09
nerbos

something is defenitly wrong in this script

it kicks a user many times in a row in the same minut;
it puts the user in tempban
it puts the user in permban  over 15 times
and all these with message in main

this is from main:


[09:34:54] <=[G?KK?]=> *** User [NL]--Liekerdjuh should be checked. Reason: Suspected Files containing exceeded large dvd rips
[09:42:06] <=[Konsole#]=> The user [NL]--Liekerdjuh is been kicked for NO sharing of incomplete downloads
[09:42:06] <=[Konsole#]=> The user [NL]--Liekerdjuh is been kicked for NO sharing of incomplete downloads
[09:42:06] <=[Konsole#]=> The user [NL]--Liekerdjuh is been kicked for NO sharing of incomplete downloads
[09:42:06] <=[Konsole#]=> The user [NL]--Liekerdjuh is been banned for NO sharing of incomplete downloads
[09:42:06] <=[Konsole#]=> The user [NL]--Liekerdjuh is been banned for NO sharing of incomplete downloads
[09:42:06] <=[Konsole#]=> The user [NL]--Liekerdjuh is been banned for NO sharing of incomplete downloads
[09:42:06] <=[Konsole#]=> The user [NL]--Liekerdjuh is been banned for NO sharing of incomplete downloads
[09:42:06] <=[Konsole#]=> The user [NL]--Liekerdjuh is been banned for NO sharing of incomplete downloads
[09:42:06] <=[Konsole#]=> The user [NL]--Liekerdjuh is been banned for NO sharing of incomplete downloads
[09:42:06] <=[Konsole#]=> The user [NL]--Liekerdjuh is been banned for NO sharing of incomplete downloads
[09:42:06] <=[Konsole#]=> The user [NL]--Liekerdjuh is been banned for NO sharing of incomplete downloads
[09:42:06] <=[Konsole#]=> The user [NL]--Liekerdjuh is been banned for NO sharing of incomplete downloads
[09:42:06] <=[Konsole#]=> The user [NL]--Liekerdjuh is been banned for NO sharing of incomplete downloads
[09:42:06] <=[Konsole#]=> The user [NL]--Liekerdjuh is been banned for NO sharing of incomplete downloads
[09:42:06] <=[Konsole#]=> The user [NL]--Liekerdjuh is been banned for NO sharing of incomplete downloads
[09:42:06] <=[Konsole#]=> The user [NL]--Liekerdjuh is been banned for NO sharing of incomplete downloads
[09:42:06] <=[Konsole#]=> The user [NL]--Liekerdjuh is been banned for NO sharing of incomplete downloads
[09:42:06] <=[Konsole#]=> The user [NL]--Liekerdjuh is been banned for NO sharing of incomplete downloads
[09:42:06] <=[Konsole#]=> The user [NL]--Liekerdjuh is been banned for NO sharing of incomplete downloads
[09:42:06] <=[Konsole#]=> The user [NL]--Liekerdjuh is been banned for NO sharing of incomplete downloads
[09:42:06] <=[Konsole#]=> The user [NL]--Liekerdjuh is been banned for NO sharing of incomplete downloads
[09:42:06] <=[Konsole#]=> The user [NL]--Liekerdjuh is been banned for NO sharing of incomplete downloads
[09:42:06] <=[Konsole#]=> The user [NL]--Liekerdjuh is been banned for NO sharing of incomplete downloads
[09:42:06] <=[Konsole#]=> The user [NL]--Liekerdjuh is been banned for NO sharing of incomplete downloads

QuoteCan you fix this fine script so when a user get a warn/kick/ban it shows this info to!: Movies/Mixed-Movies/Animalsex.avi

So the script shows where the bad-files are in the users share!

it also isnt showing WHERE the wrong files are in wich DIR



this is the kick.txt from the user


[NL]--Liekerdjuh|NO sharing of incomplete downloads|1|Day: 17/02/2004 Hour: 09:42:06

[NL]--Liekerdjuh|NO sharing of incomplete downloads|2|Day: 17/02/2004 Hour: 09:42:06

[NL]--Liekerdjuh|NO sharing of incomplete downloads|3|Day: 17/02/2004 Hour: 09:42:06

look at the time the user has no change to get back in.


so i gues there is someting wrong.
i will put the script i use in next message
Title:
Post by: [NL]trucker on 17 February, 2004, 13:04:13
oke here is the script:

====================================

-- 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 = "=[Konsole#]="

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

Files = {
[".dll"]="NO sick Porn inhere!",
["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",
["Netlimiter"] = "no tools for limiting speed allowed",
["czdc"] = "no sharing of fake clients"}
 

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] == nill) then -- this will solve the nill problem i think
warn[user.sName] = 0
end
if (kick[user.sName] == nill) 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+") - 2
local path = strsub(data, s, e)
if( nick == BotName) then
   for i=1,getn(usersimune) do
   if (user.bOperator or user.sName == usersimune) then
   return 1
   elseif (GetProfileName(user.iProfile) == "VIP") then
      if (warn[user.sName] == 0 or warn[user.sName] == 1 or warn[user.sName] == 2) then
         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()
      elseif (warn[user.sName] == 3 or kick[user.sName] == 1 or kick[user.sName] == 2) then
         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.."|"..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 (kick[user.sName] == 3) then
         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()
      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] == 0 or kick[user.sName] == 1 or kick[user.sName] == 2) then
         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.."|"..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 (kick[user.sName] == 3) then
         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()
      end
   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
======================================
Title:
Post by: nErBoS on 17 February, 2004, 13:42:36
Hi,

Forgot to close the FOR, sorry...

Problem solved..

-- 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] == nill) then -- this will solve the nill problem i think
warn[user.sName] = 0
end
if (kick[user.sName] == nill) 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+") - 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
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
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
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
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
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()
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

Best regards, nErBoS
Title:
Post by: [NL]trucker on 17 February, 2004, 14:30:16
nerbos

hello there m8 are the requested feature,s also incorperated in this version?


like :

QuoteSo the script shows where the bad-files are in the users share!

(NL)renoreno|NO sharing of incomplete downloads|1|Day: 15/02/2004 Hour: 22:03:30

(NL)renoreno|NO sharing of incomplete downloads|2|Day: 15/02/2004 Hour: 22:03:30

QuoteCOLOR=red]look at the times of the kick it counts 1 kick as 2[/COLOR]

and if you still are on the right way perhaps a kicklog from the OP,s also

so i mean this

user x is kicked at [date]at [time]by [botname] because....[dir][filename]  reason [.....

user y is kicked at [date] at [time]by [OP [name] because ......


that would make this script even better than it allready is by yur help m8
Title:
Post by: nErBoS on 17 February, 2004, 15:11:37
Hi,

Have you tried the last one i send ???
The path is show to the user and is saved on the kicklog !!

Tell me whats is missing or not working !!

Best regards, nErBoS
Title:
Post by: [NL]trucker on 17 February, 2004, 15:20:48
i,ve jut copied it and gonna test it :-)
Title:
Post by: [NL]trucker on 17 February, 2004, 19:13:41
Nerbos


i just tested it and got this error

Script started.
Syntax error: attempt to perform arithmetic on a nil value
stack traceback:
   1:  function `DataArrival' at line 62 [file `D:\==PTOTAX==\gekkobeta5\scripts\kick-bot.lua']

Syntax error: attempt to perform arithmetic on a nil value
stack traceback:
   1:  function `DataArrival' at line 62 [file `D:\==PTOTAX==\gekkobeta5\scripts\kick-bot.lua']

Script stopped.
Title:
Post by: [NL]trucker on 17 February, 2004, 19:16:24
this is the script; i added a few lines in forbidden files

--------------------------------------------------------------------

-- 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 = "=[Konsole#]="

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",
["Netlimiter"] = "no tools for limiting speed allowed",
["czdc"] = "no sharing of fake clients",
["bcdc"] = "no sharing of fake clients",
}

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] == nill) then -- this will solve the nill problem i think
warn[user.sName] = 0
end
if (kick[user.sName] == nill) 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+") - 2
local path = strsub(data, s, e)
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
         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
         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
         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) then --this will solve the double log i think
      if (kick[user.sName] == 3) then
         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
         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()
      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
Title:
Post by: nErBoS on 18 February, 2004, 00:12:28
Hi,

try 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 = "=[Konsole#]="

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

Files = {
[".dll"]="NO sick Porn inhere!",
["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",
["Netlimiter"] = "no tools for limiting speed allowed",
["czdc"] = "no sharing of fake clients",
["bcdc"] = "no sharing of fake clients",
}

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) then -- this will solve the nill problem i think
warn[user.sName] = 0
end
if (kick[user.sName] == nil) 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+") - 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
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
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
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
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
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()
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

I think that us that why i used  ==nill and should be ==nil  :)
Let's hope this time works.

Best regards, nErBoS
Title:
Post by: [NL]trucker on 18 February, 2004, 15:44:02
Nerbos

?????
----------------------------------------------------
Files = {
[".dll"]="NO sick Porn inhere!",
-----------------------------------------------------

did you add this line?


btw gonna try new script.
Title:
Post by: nErBoS on 18 February, 2004, 16:06:38
Hi,

Never mind that i use that to test the script to get dlls.
You can remove

Best regards, nErBoS
Title:
Post by: [NL]trucker on 18 February, 2004, 17:21:05
nerbos

as far as i can see  the logs are looking great :-)

----------------------------------------------------------------

[NL]--Liekerdjuh|NO sharing of incomplete downloads| d:\ISO\DVD - Rip\Pirates Of The Caribbean\VIDEO_TS.VOB|1|Day: 18/02/2004 Hour: 16:01:37

--------------------------------------------------------------------

perfect job there m8.

and i dont mind you adding things to script i just noticed it and wanted to be sure it was you who did it.

will comment later on about bot again.



grrrrr  :rolleyes:  ?(

got this error again

------------------------------------------------
Syntax error: attempt to perform arithmetic on a nil value
stack traceback:
   1:  function `DataArrival' at line 63 [file `D:\==PTOTAX==\gekkobeta5\scripts\kick-bot.lua']



and not only logs; bot is showing in main also :)

-----------------------------------------------------------------
<=[Konsole#]=> The user rups is been kicked for NO sharing of incomplete downloads
---------------------------------------------------------------------
Title:
Post by: nErBoS on 18 February, 2004, 18:47:56
Hi,

I noticed that you are using the ptokax 0.3.3.0 debug try to use on the TD4 and see if the error happens.

Best regards, nErBoS
Title:
Post by: *??G??* on 19 February, 2004, 20:03:14
Syntax error: attempt to perform arithmetic on a nil value.......i get this error alot when using this script and i also noticed that if the same user gets kicked more than once the total amount times they have been kicked doesn't go up, it just adds another line to the kick.txt and showing that they have only been kicked 1 time even though they have been kicked 2 times
Title:
Post by: nErBoS on 19 February, 2004, 21:41:31
Hi,

Try 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] == nill or warn[user.sName] == 4) then
warn[user.sName] = 0
end
if (kick[user.sName] == nill 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+") - 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
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
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
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
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
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

I have tryied every conditions and had no sytanx errors.
Sometimes coulde be users which get connect a disconnect at same time and the bot can?t get their information.

Best regards, nErBoS
Title:
Post by: *??G??* on 19 February, 2004, 23:05:10
thnx.....will give this one a try
Title:
Post by: MetalPriest on 25 March, 2004, 19:38:49
Hello..

Here is the script...but error is there anyway

Syntax Error: attempt to perform arithmetic on a nil value...So help needed experts..

MetalPriest

----------------------------------------------------------------------

------ Code -----

BotName = "-=BadFilesBot=-"

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

Files = {
[".dll"]="NO dll files in here!",
[".toast"]="NO toast files inhere!",
["tmp"]="NO sharing of incomplete downloads",
[".vob"]="NO sharing of DVD files,who want's them ??",
[".ifo"]="NO sharing of DVD files,who want's them ??",
["_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",
["uniwise.exe"]="NO installed programs allowed"

}

warn = {}
kick = {}
usersimune = {""} -- 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] == nill or warn[user.sName] == 4) then
warn[user.sName] = 0
end
if (kick[user.sName] == nill 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+") - 2
local path = strsub(data, s, e)
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
         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
         warn[user.sName] = warn[user.sName] + 1
         kick[user.sName] = kick[user.sName] + 1
         Reason = FindWhat(data)
         SendPmToOps(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
         warn[user.sName] = warn[user.sName] + 1
         Reason = FindWhat(data)
         SendPmToOps(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
         kick[user.sName] = kick[user.sName] + 1
         Reason = FindWhat(data)
         SendPmToOps(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
         kick[user.sName] = kick[user.sName] + 1
         user:SendData(Bot, kick[user.sName])
         Reason = FindWhat(data)
         SendPmToOps(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

---------------------the end-----------------------------------------
Title:
Post by: nErBoS on 26 March, 2004, 02:05:17
Hi,

Try 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] == nill or warn[user.sName] == 4) then
warn[user.sName] = 0
end
if (kick[user.sName] == nill 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+") - 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] == nill) then
warn[user.sName] = 0
end
if (kick[user.sName] == nill) then
kick[user.sName] = 0
end
end

Best regards, nErBoS
Title:
Post by: MetalPriest on 26 March, 2004, 09:41:31
Yeaaaa THanks

No error so far... And this is 10 minutes...


You are good nErBoS

Meny thanks

MetalPriest
?Sweden
dchub://metalsweden.servemp3.com
Title:
Post by: jsjen on 26 March, 2004, 13:58:01
Search spam detected from Illegalist

what does this mean? everone gets it on eentry

I feel a bit stupid
Title:
Post by: [NL]trucker on 26 March, 2004, 14:32:25
jsjen

as illegalist is a search script it connects to evryone who is coming into hub ;and searches through their filelist and as a result of that you get that message so nothing to worry about.
Title:
Post by: MetalPriest on 28 March, 2004, 20:17:04
Same error come up

Syntax Error: attempt to perform arithmetic on a nil value

Wonder why and where.....


 
MetalPriest
Title:
Post by: nErBoS on 28 March, 2004, 21:52:52
Hi,

There was a bug in the last script instead of nil i have put nill i used to use null :P

Corrected...

-- 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] == nill or warn[user.sName] == 4) then
warn[user.sName] = 0
end
if (kick[user.sName] == nill 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+") - 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
Title:
Post by: MetalPriest on 29 March, 2004, 07:59:50
Thanks nErBoS

I need this script..so here we go again..

MetalPriest
Title:
Post by: MetalPriest on 31 March, 2004, 09:03:13
Sorry but this error come up again...

MetalPriest
Title:
Post by: [NL]trucker on 31 March, 2004, 10:03:52
yep

MetalPriest is right the same eror is coming up again (:-
Title:
Post by: nErBoS on 31 March, 2004, 12:47:08
Hi,

Are any of you is using ptokax 0.3.3.0. If yes show me the syntax error, probably has the line would be easier to me to find the error.

Best regards, nErBoS
Title:
Post by: [NL]trucker on 31 March, 2004, 13:41:53
Nerbos

i,m using 15,25 and if i,m right this is the error

Syntax Error: attempt to perform arithmetic on a nil value

i had the full line but it was gone after a restart (:-

when it comes back i,ll show it.


oke here it is :
--------------------------------
Syntax error: attempt to perform arithmetic on a nil value
stack traceback:
   1:  function `DataArrival' at line 59 [file `...OTAX==\trucker\scripts\illegalist_by_nerbos.lua']
Title:
Post by: nErBoS on 01 April, 2004, 00:34:19
Hi,

[NL]trucker can you send me in PM the script as exactly as you are using in your Hub or post here if you don't mind.

Best regards, nErBoS
Title:
Post by: [NL]trucker on 01 April, 2004, 09:42:00
Nerbos;

oke here we go


with the error:

Syntax error: attempt to perform arithmetic on a nil value
stack traceback:
   1:  function `DataArrival' at line 59 [file `...OTAX==\trucker\scripts\illegalist_by_nerbos.lua']
+++++++++++++++++++++++++++++++++++++

-- 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","TiMeTrAVelleR","[TGA]plop","[NL]ZeroX",
"[NL]WizzCat","[NL]SuusTweety","[NL]king","[NL]HsH","[NL]Hasjmann","[NL]GePe"} -- 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] == nill or warn[user.sName] == 4) then
warn[user.sName] = 0
end
if (kick[user.sName] == nill 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+") - 2
local path = strsub(data, s, e)
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("[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) 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

++++++++++++++++++++++++++++++++++++++++
Title:
Post by: nErBoS on 01 April, 2004, 15:02:19
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
Title:
Post by: nErBoS on 13 April, 2004, 15:12:44
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
Title:
Post by: [NL]trucker on 13 April, 2004, 20:21:18
thnx m8 was waiting for an update ...

gonna test it as usual
Title: Hi
Post by: prtjoe on 03 August, 2004, 02:59:56
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
Title:
Post by: BottledHate on 03 August, 2004, 06:01:08
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
Title:
Post by: prtjoe on 06 August, 2004, 23:06:11
can some1 help me with my last post