PtokaX forum

Archive => Archived 5.0 boards => Finished Scripts => Topic started by: Northwind on 28 February, 2006, 12:36:51

Title: Disallow old DC++ clients without TTH support
Post by: Northwind on 28 February, 2006, 12:36:51
I modded a little this great script by PPK. Now it can ban user for specific time and it shows link for dc++ home page. I know this is not big deal but... anyway... hehehe... first post here in backupped luaboard. Hope you like it


-- Simply script to disallow old DC++ clients without TTH support by PPK
-- Timeban,Botname and dc++ addy by Northwind 27-02-2006

sBot = frmHub:GetHubBotName()
tban = 5 --TimeBan in minutes

function NewUserConnected(curUser)
if curUser.bHasTag then
if curUser.sClient == "DC++" then
if tonumber(curUser.sClientVersion) < 0.401 then
curUser:SendData(sBot,"Your DC++ client version: "..curUser.sClientVersion.. " is not allowed here. Use atleast version 0.401")
curUser:SendData(sBot,"You have been "..tban.." min tempbanned. Get newest DC++ from http://dcplusplus.sourceforge.net/")
curUser:TimeBan(tban)
return 1
end
end
end
end
Title: Re: DC++ "only hash capable clients"
Post by: blackwings on 28 February, 2006, 13:19:49
this script doesn't check if the client can use hash, it just check if the user has a tag,
if user use DC++ and if the user has v 0.401 or newer.
Title: Re: DC++ "only hash capable clients"
Post by: Northwind on 28 February, 2006, 14:11:05
Changed topic name to be more specific ;-)