PtokaX forum

Archive => Archived 5.0 boards => Finished Scripts => Topic started by: plop on 28 February, 2005, 17:40:46

Title: Anti-NoHashClients
Post by: plop on 28 February, 2005, 17:40:46
-- Simply script to disallow old DC++ clients without TTH support by PPK

function NewUserConnected(curUser)
if curUser.bHasTag then
if curUser.sClient == "DC++" then
if tonumber(curUser.sClientVersion) < 0.401 then
curUser:SendData("Please upgrade your client, min version for this hub is 0.401")
curUser:Disconnect()
return 1
end
end
end
end

plop
Title:
Post by: Jorgo on 28 February, 2005, 17:43:54
Why not make it 0.4034 as min? In my opinion it's better to have a unicode client, saves a lot of grief in the long run with multi-language files  :D
Title:
Post by: Pothead on 28 February, 2005, 18:20:49
A lot of hubs kick 0.4034.

Shouldn't oDC and NMDC also be blocked, as they don't support TTH ? :)
Title: oDC
Post by: Dag on 28 February, 2005, 18:47:04
Hi,

if you want to block oDC, try this:
function NewUserConnected(curUser)
if curUser.bHasTag then
                if curUser.sClient == "oDC" then
curUser:SendData(" Sorry, last official version of your client is based on DC++ 0.306 and not suport hashing !")
curUser:SendData(" Please get another and newer client. If you don't know available clients check [URL]http://www.broadbandreports.com/faq/6513[/URL]")
curUser:SendData("")
curUser:SendData("$ForceMove "..frmHub:GetRedirectAddress())
curUser:Disconnect()
return 1
                         end
end
end
Title:
Post by: Pothead on 28 February, 2005, 19:10:14
This is what i'm using
function NewUserConnected(curUser)
if curUser.bHasTag then
if curUser.sClient == "NMDC2" or curUser.sClient == "oDC" or curUser.sClient == "DCPRO" or curUser.sClient == "StrongDC++" or curUser.sClient == "LDC++" then
curUser:SendData(" " ..curUser.sClient.. " sucks, get DC++ from [URL]www.sourceforge.net[/URL]")
curUser:SendData("$ForceMove "..frmHub:GetRedirectAddress())
curUser:Disconnect()
return 1
end
end
end

And have the miniversion one running separately.  I should really combine them ;)
Title:
Post by: blackwings on 28 February, 2005, 19:48:18
lol, guys, if you want to competly block a client, do this =>

1) Go to rules, choose to reject "Users without DC tag"
2) Open "ClientTags.dat" in the main directory where "PtokaX.exe" is.
3) delete those lines with clients that shouldn't be allowed.
Title:
Post by: bastya_elvtars on 28 February, 2005, 19:52:08
4) block dc++ under 0.307
5) block old dcgui

but use script or DCDM. safer.
Title:
Post by: blackwings on 28 February, 2005, 20:17:52
QuoteOriginally posted by bastya_elvtars
4) block dc++ under 0.307
5) block old dcgui

but use script or DCDM. safer.
Why is it safer with script instead of using the "ClientTags.dat" ?
and about your nr 4, I use a script that blocks below 0.401.

5) what min version do you recommend, or has the new DCGUI even changed tag?
Title:
Post by: bastya_elvtars on 28 February, 2005, 21:08:05
If you use script, why use the dat? scripts can be more customised. :S

Dunno what DCGUI knows the hashing.
Title:
Post by: blackwings on 28 February, 2005, 21:56:36
QuoteOriginally posted by bastya_elvtars
If you use script, why use the dat? scripts can be more customised. :S

Dunno what DCGUI knows the hashing.
hmm, does ptokax just block without sending a message when using the "ClientTags.dat"?