A script that kicks users sharing program files, windows, etc.
 

A script that kicks users sharing program files, windows, etc.

Started by #jdslkfjals#, 15 December, 2004, 22:14:59

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

#jdslkfjals#

I need a? script that checks users if they are sharing program files and other unusefull directories
and kicks them

it would be very helpfull if someone can make me or tell me about a script that does that

Herodes

this has been discussed thouroughly and been tryed many times ...

if you need this kind of checking your best solution will be using an op client ( DCDM++ ) with a proper configuration in settings and also in ADLSearch ...

If you dont know what ADLSearch means try looking the dc++ FAQ and searching this forum about it ..

same goes for DCDM++

witch

QuoteOriginally posted by HauxiR
I need a? script that checks users if they are sharing program files and other unusefull directories
and kicks them

it would be very helpfull if someone can make me or tell me about a script that does that

try this m8:

_____________________________________________
--## Simple Welcomer Bot

--## Requested by stuCkwe

--## Made by nErBoS



-- 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 = "callhow u want"



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 Audiogalaxy downloads",

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

["INCOMPLETE~"]="NO sharing of incomplete Soulseek downloads",

[".GETRIGHT"]="NO sharing of incomplete GetitRight downloads",

["install.log"]="NO sharing of installed games, programs, wav, vob, dll, sys etc. files",

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

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

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

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

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

["Hacking"]="NO tools for hacking allowed"}



warn = {}

kick = {}

usersimune = {

"[???][NL]GePe",

"[???][NL]Hasjmann",

"[???][NL]-Luke",

"[???][NL]redwitch",

"[???][UK]John",

"[???][NL]ZeroX]",

"[???][NL]WizzCat",

"[???]-=Akela=-",

"[???]AiR",

"[???]Bull??T??????",

"[???]Dennis",

"[???]Geroni",

"[???]HsH",

"[???]plop",

"[???]Queeny",

"[???]three80",

"[???]T?M??r?V?ll?R",

"(NL)Janto",

"[NL]Coco",

"[NL]cpu_point",

"[NL]Dark_bad_girl",

"[NL]DiGARiX",

"[NL]Donna[eric]",

"[NL]fuego_gt",

"[NL]itsmeleo",

"[NL]janeb",

"[NL]jobsoft",

"[NL]Mazda626",

"[NL]movieman",

"[NL]Raymond",

"[NL]Spikey",

"[NL]SuusTweety",

"[NL]voodoo",

"[TGA]G-DIGGA",

"[UKD]jiorgee",

"DoJiN",

"hhps",

"iLluSiOn",

"kepp2",

"KoReNWoLF",

"MisteryT",

"Quaraf",

"Serima",

"speedman[psv]",

"TeQuilla",

"TheWickedRabbit",

"TiMeTrAVelleR",} -- 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 and path ~= nil) 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
_____________________________________________

works good 4 me ;)



#jdslkfjals#

thanks but that isnt exatly what i need, ive already tried this script and it didnt work for me, i think the problem is checking directories

bastya_elvtars

QuoteOriginally posted by HauxiR
thanks but that isnt exatly what i need, ive already tried this script and it didnt work for me, i think the problem is checking directories

use a CLIENT for it (a.k.a. DCDM++)

or anything that is not PtokaX

serverside bad file scanning is INACCURATE
Everything could have been anything else and it would have just as much meaning.

SMF spam blocked by CleanTalk