Client Shield
Version: 1.1
By: NightLitch
Date: 2004-03-11
Allow/Deny Client's:
DC++, oDC, DC:PRO, DCGUI, DCTC
NeoModus 2, iDC, zDC++, MS++
DC++k CDM, Phantom DC++
Bear Claw DC++, CZDC++, Ruri_Ruri
NoTag/Unknown, Fake
Download! (http://swenorth.myftp.org/network/nightlitch/scripts/clientshield.1.1.rar)
looks great il give it a try :)
Is this the one that are in NXS-3 NL?
//WickeD
QuoteOriginally posted by WickeD
Is this the one that are in NXS-3 NL?
//WickeD
Nope, but I will implent it to NXS-3 l8r.
Great script NightLitch, just what I was looking for. Now I can ban DC++ and all the DC++ emulators. One question tough.. does it allow or denie clients that are not listed?
I got one error: Syntax Error: bad argument #1 to `strfind' (string expected, got nil)
I translated the masseges to icelandic.. maybe thats the error.. I don?t know.
-------------------------------------------------
-- Client Shield --
-------------------------------------------------
sBot = "Client-Shield"
-------------------------------------------------
-- Don't Edit
sVersion = "1.1"
sCreator = "NightLitch"
sDate = "2004-03-11"
-------------------------------------------------
-- Set Clients 1=on / 0=off
AllowClients = {
["DC++"]=0,
["oDC"]=1,
["DC:PRO"]=0,
["DCGUI"]=1,
["DCTC"]=0,
["NeoModus 2"]=1,
["iDC"]=1,
["zDC++"]=0,
["MS++"]=0,
["DC++k CDM"]=0,
["Phantom DC++"]=0,
["Bear Claw DC++"]=0,
["CZDC++"]=0,
["Bear Claw DC++"]=0,
["Ruri_Ruri"]=0,
["NoTag/Unknown"]=0,
["Fake"]=0,
}
-- Set Profile MinSlots
MinSlots = {
[2] = 2, -- VIP
[3] = 2, -- REG
[-1]= 4, -- User
}
-- Set Profile MaxSlots
MaxSlots = {
[2] = 15, -- VIP
[3] = 5, -- REG
[-1]= 5, -- User
}
-- Set Profile SlotRatio
SlotRatio = {
[2] = 2, -- VIP
[3] = 2, -- REG
[-1]= 2, -- User
}
-- Set Profile MaxHubs
MaxHubs = {
[2] = 2, -- VIP
[3] = 2, -- REG
[-1]= 2, -- User
}
-- Set Profile Netlimiter
NetLimiter = {
[2] = 0, -- VIP
[3] = 0, -- REG
[-1]= 0, -- User
}
-----------------------------------------------------------
-- Don't edit bellow this point
sClients = {
{ "{ "<++","DC++" },
{ "{ "{ "{ "http://dc.ketelhot.de","DCGUI" },
{ "{ "{ "zDC++","zDC++" },
{ "","MS++" },
{ "{ "<.P>","Phantom DC++" },
{ "}
function NewUserConnected(sUser)
local Client,Speed,Share,Tag = sParseMyInfo(sUser.sMyInfoString)
sUser:SendData("Running "..sBot.." Version: "..sVersion.." By: "..sCreator.." ( "..sDate.." ) ")
sUser:SendData(" ")
sUser:SendData("Welcome "..sUser.sName.." you are using "..Client.." version: "..Tag["V"])
end
function sParseMyInfo(sMyInfo)
local sClient = "NoTag/Unknown"
for i = 1,getn(sClients) do if strfind(sMyInfo,sClients[1]) then sClient = sClients[2] end end
local sBwidh = "Unlimited"
local _,_,sSpeed,sShare = strfind(sMyInfo,"^%$MyINFO %$ALL [^ ]+ [^$]*%$ $([^$]+)[^$]%$[^$]*%$%s*(%d+)%$")
sShare = tonumber(sShare)
local _,_,sVer,sMode = strfind(sMyInfo,"V:(.*),M:([SAP])")
local _,_,sHub = strfind(sMyInfo,"H:(%d+)")
local _,_,sSlot = strfind(sMyInfo,"S:(%d+)")
local _,_,sBwidh = strfind(sMyInfo, "[LBF]:%d*%/?(%d+)")
if strfind(sMyInfo,"<%+%+") then _,_,sVer = strfind(MyInfo,"") sClient = "oDC"
elseif strfind(sMyInfo,"Ruri_Ruri") then sClient = "Ruri_Ruri"
elseif sClient=="iDC" then _,_,sVer = strfind(sMyInfo,"") end
if strfind(sMyInfo,"H:\"%d+/%d+/%d+\"") then sClient = "Fake" end
if strfind(sMyInfo, "L:") then sClient = "CZDC++"
elseif strfind(sMyInfo, "B:") then if not sClient=="Phantom DC++" then sClient = "Bear Claw DC++" end end
sTag = {["S"]=sSlot,["B"]=sBwidh,["H"]=sHub,["V"]=sVer,["M"]=sMode}
return sClient,sSpeed,sShare,sTag
end
function DataArrival(sUser, data)
if (strsub(data,1,7) == "$MyINFO") and not sUser.bOperator then
local Client,Speed,Share,Tag = sParseMyInfo(data)
if AllowClients[Client]~=1 then
sUser:SendData(sBot," "..Client.." er banna? ? hubbnum, nota?u oDC, iDC++, NMDC, DCgui e?a DCGui-QT !")
sUser:Disconnect()
else
if ( Tag["S"]==nil or Tag["H"]==nil ) then
sUser:SendData(sBot,"?? ert a? fela Tag-i?, banna?!")
sUser:Disconnect()
elseif ( tonumber(Tag["S"]) < MinSlots[sUser.iProfile] ) then
sUser:SendData(sBot,"?? ert me? of f? slot opin, l?marki? er "..MinSlots[sUser.iProfile].." slot(s) open.")
sUser:Disconnect()
elseif ( tonumber(Tag["S"]) > MaxSlots[sUser.iProfile] ) then
sUser:SendData(sBot,"?? ert me? of m?rg slot opin, h?marki? er "..MaxSlots[sUser.iProfile].." slot(s) open.")
sUser:Disconnect()
elseif ( SlotRatio[sUser.iProfile] and tonumber(Tag["S"]) < tonumber(Tag["H"])*SlotRatio[sUser.iProfile] ) then
sUser:SendData(sBot,"?? ert me? of f? slot opin, l?marki? er "..SlotRatio[sUser.iProfile].." slot ? hvern Hub.")
sUser:Disconnect()
elseif ( tonumber(Tag["H"]) > MaxHubs[sUser.iProfile] ) then
sUser:SendData(sBot,"?? ert ? of m?rgum hubbum, h?marki? er "..MaxHubs[sUser.iProfile].." hubbar.")
sUser:Disconnect()
elseif not Tag["B"]=="Unlimited" and ( tonumber(Tag["B"]) < NetLimiter[sUser.iProfile] ) then
sUser:SendData(sBot,"You have limit your bandwidh to "..Tag["B"].." kB/s, minimum is "..NetLimiter[sUser.iProfile].." kB/s.")
sUser:Disconnect()
end
end
end
end
Thats my script... can you find the error.
oh and i?m useing Robocop aswell if you think that could be a prob.
Hi,
You must remeber that if you change the text that os not in " " you will ruin the script,exept that you now what u are doing
MX-10
Iceland
Script updated above. Error fixed.
/NL
Yep tanx.....but you did not answer the "..does it allow or denie clients that are not listed? ". And are you going to put more clients on that list.
MX-10........j? ?g veit ?a? :o)
hver ert ?? ? Valh?ll, kannast ekki vi? ?etta nick. Virkar lua ? Verlihubba? er ?a? ekki eina sem ?i? eru? me?, e?a ertu kannski bara user ? Valh?ll.
Am gonna update it more, when I get the time.
It is a real fine bot now. But more will come.
/NL
hehehe again you did not answer this: "..does it allow or denie clients that are not listed? ".
Yep it?s really good script :o)
(=CyberPimp=)
Quotehehehe again you did not answer this: "..does it allow or denie clients that are not listed? ".
something that you dont block will automatticly be allowed .
And since there arent any other clients listed in the script they dont get blocked
That is why NL said
QuoteAm gonna update it more, when I get the time.
It is a real fine bot now. But more will come.
that he would update this script.
I have a few more client to work my way through so I can make it more complete, but the thing is that almost every client can emulate DC++ so.
But I will see what I can come up with.
/NL
Quotebut the thing is that almost every client can emulate DC++ so.
..... that is wuy I block DC++ now, works great :D I only allow oDC, iDC, NMDC, DCgui and DCGui-QT cos thay are not emulated by other clients. I don?t see any reason to allow DC++ when you have oDC and iDC, thay are better clients anyways. It?s the only way to get rid of those emulated clients.
Sorry that I did not undersatand... well NL Tucker came with the sf answer that I were looking for... :baby:
if you have blocked dc++, do you think you have users left ??
yes I have all my users I have been blockin DC++ for a week now and no problems, this is a privet hub and the users just have to change the client... and that isn?t difficult. :D
Nightlitch
are ya still working on a update??
QuoteOriginally posted by [NL]trucker
Nightlitch
are ya still working on a update??
Yes I Am, trying to get some more clients in and trying to specify some things that make one or more clients unique.
But plz feel free and come with suggestions... plz...
/NL
nl
if you go to [NL]Pur his site you find a lot of diffrent clients
http://dcjungle.sytes.net/
this is a great script!
it would be nice if it could detect netlimiter in all of those
clients so it would be possible to block all of them if they
have netlimiter installed.
if the user is using odc and has netlimiter installed on the computer then the script would block him.
but maybe that is to much work :rolleyes:
it would be very nice if it would be avaible to config this script to only check ops. because i dont like when my ops are using oDC and DC++
..... that is wuy I block DC++ now, works great :D I only allow oDC, iDC, NMDC, DCgui and DCGui-QT cos thay are not emulated by other clients. I don?t see any reason to allow DC++ when you have oDC and iDC, thay are better clients anyways. It?s the only way to get rid of those emulated clients
*coughs* RMDC can emulate oDC
All clients can be emulated , so banning DC++ , don't help much. people just find other clients to emulate ..
Typhoon?