PtokaX forum

Archive => Archived 5.0 boards => Finished Scripts => Topic started by: blackwings on 15 June, 2005, 19:15:57

Title: DC++ only (more accurate)
Post by: blackwings on 15 June, 2005, 19:15:57
If I understood PPK and Pothead correctly, this would make a more accurate DC++ only script = --Anti rmDC++ script for PtokaX 0.3.3.0 Lua 5.0.2 by PPK
--CHANGED: modded to become a dc++ only script
----version 1.0

--//Start of Config
Bot = frmHub:GetHubBotName()

DcVer = "0.674"
--//End of Config

function NewUserConnected(curUser)
if not curUser.bOperator then
if curUser.bHasTag then
if curUser.sClient=="DC++" then
if tonumber(curUser.sClientVersion) < tonumber(DcVer) then
curUser:SendData(Bot,"You aren't using DC++, go away")
curUser:Disconnect()
return 1
end
else
curUser:Disconnect()
end
else
curUser:Disconnect()
end
end
end


function SupportsArrival(curUser, sData)
if string.sub(sData, 10, 11) == "  " then
curUser:SendData( Bot.."Buggy client, go away!")
SendPmToNick(Bot, " rmDC++ from IP: "..curUser.sIP.." trying to login... he is his wasting time")
curUser:Disconnect()
return 1
elseif not string.find(sData, "Supports UserCommand NoGetINFO NoHello UserIP2 TTHSearch GetZBlock")then
curUser:SendData( Bot.."You aren't useing DC++, go away")
SendPmToNick(Bot, " Non-DC++ client from IP: "..curUser.sIP.." trying to login... he is his wasting time")
curUser:Disconnect()
return 1
end
end
Title:
Post by: Pothead on 15 June, 2005, 19:34:46
How come clients less than 0.670 aren't classed as DC++ ?
Title:
Post by: blackwings on 15 June, 2005, 19:40:45
QuoteOriginally posted by Pothead
How come clients less than 0.670 aren't classed as DC++ ?
you mean that the support I use is only for 0.670 and newer?
Title:
Post by: Pothead on 15 June, 2005, 19:50:50
Yup. In that case, you should only support 0.674 clients (for the security fix). :)
Title:
Post by: blackwings on 15 June, 2005, 19:56:22
QuoteOriginally posted by Pothead
Yup. In that case, you should only support 0.674 clients (for the security fix). :)
ok, I have edited the script. So how should the support look like if I want to allow dc++ as old as 0.401(so that I can edit the script :) )?
Title:
Post by: Dessamator on 15 June, 2005, 20:35:44
well u can do it in 2 ways,
1.create a table of allowed dcs

or

2. if version is less than 0.674 and more then 0.401 then -- dostuff
Title:
Post by: PPK on 15 June, 2005, 20:41:53
One small thing, GetZBlock is optional in DC++ (safe and compessed transfers) ;) And one more thing DC++ have bug and always have space after last supports... some mods have this fixed :)) And for me is time to improve DC++ emulation in CZDC++ >:-]
Title:
Post by: Pothead on 15 June, 2005, 20:43:50
QuoteOriginally posted by blackwings
QuoteOriginally posted by Pothead
Yup. In that case, you should only support 0.674 clients (for the security fix). :)
ok, I have edited the script. So how should the support look like if I want to allow dc++ as old as 0.401(so that I can edit the script :) )?
You don't really need to do the supports for DC++, the min ver does that fine. Unless you did it the otherway around. Block all clients which don't follow DC++ support structure. :)
Title:
Post by: blackwings on 15 June, 2005, 20:55:21
QuoteOriginally posted by PPK
And for me is time to improve DC++ emulation in CZDC++ >:-]
dont do that, I think its great to be able to detect czdc++ even if its emulate dc++ tag.
Title:
Post by: Pothead on 15 June, 2005, 21:45:23
How about a
Title:
Post by: PPK on 15 June, 2005, 23:26:17
QuoteOriginally posted by Pothead
How about a
CZDC++ is modified DC++, but always DC++ and because this have DC++ tag :P I don't change tag now, after 3 years of modifiing it ;)
Title:
Post by: blackwings on 16 June, 2005, 07:54:28
QuoteOriginally posted by PPK
QuoteOriginally posted by Pothead
How about a
CZDC++ is modified DC++, but always DC++ and because this have DC++ tag :P I don't change tag now, after 3 years of modifiing it ;)
so you will make it so that czdc++ cant be detected :( I dont like haveing clients with upload limiter in my hub :(
Title:
Post by: PPK on 16 June, 2005, 10:30:54
QuoteOriginally posted by blackwings
I dont like haveing clients with upload limiter in my hub :(
I know, you and most others hubowners like more DC++ with netlimiter on 1 kB/s upload :D
Title:
Post by: blackwings on 16 June, 2005, 11:03:45
QuoteOriginally posted by PPK
QuoteOriginally posted by blackwings
I dont like haveing clients with upload limiter in my hub :(
I know, you and most others hubowners like more DC++ with netlimiter on 1 kB/s upload :D
same thing with czdc++, 1kb/s upload.
but if people use netlimiter, you can just make a script that search for netlimiter under Connection in the userlist.
Title:
Post by: Pothead on 16 June, 2005, 13:45:42
How about in description.   :D Sorry, the reason i ask is, because recently i've become a lot more tolerant to other clients in my hub.  (Let most in now, except DC Stealth and Xrev).  But i have started warning people for using client emulation.  While this is fine for Strong / Ldc / RevConnect, CZDC is slightly different, because there is no way to tell if it's emulating or not, unless the users are bandwidth limiting as well.  ?(
Title:
Post by: PPK on 16 June, 2005, 14:38:52
QuoteOriginally posted by blackwings
same thing with czdc++.
Same ??? You need to check client before you block it without real reason, as i see i know nothing about CZDC++ and his up/down limiting :]
QuoteOriginally posted by blackwings
but if people use netlimiter, you can just make a script that search for netlimiter under Connection in the userlist.
And DC++ with netlimiter always working (DC++ not show netlimiter :P) :D
QuoteOriginally posted by Pothead
CZDC is slightly different, because there is no way to tell if it's emulating or not, unless the users are bandwidth limiting as well.  ?(
Good point, fixed :)) Not it always show upload limit in tag if is enabled... most users anyway not use it because up/down ratio in CZDC++ is not good for its connection speed and use netlimiter :D
Title:
Post by: Pothead on 16 June, 2005, 15:21:46
Thanks. :] hehe, i guess i'm stuck with:
Quote Hi, sorry if this is a bit of a weird request, but i don't mind you using CZDC, but could you just add it to your description in here. :)
<[NL]DrJackle> I'm away. State your business and I might answer later if you're lucky.
Title:
Post by: blackwings on 16 June, 2005, 16:11:10
QuoteOriginally posted by PPK
QuoteOriginally posted by blackwings
same thing with czdc++.
Same ??? You need to check client before you block it without real reason, as i see i know nothing about CZDC++ and his up/down limiting :]
what I meant is, that its not uncommon for czdc++ users to have set their upload limiter on just a few kb/s, seen many dsl users that use czdc++ and limit their upload to just like 2kb/s. So CZDC++ upload limiter is as bad as netlimiter, because it depends on the user on how bad it is.

So if you want to improve CZDC++ emulating, please also make so that if the user use the limiter, that it shows up in the tag(I mean, so that the user cant hide that he/she use upload limiter.)
Title:
Post by: Pothead on 16 June, 2005, 16:31:39
QuoteOriginally posted by blackwings
So if you want to improve CZDC++ emulating, please also make so that if the user use the limiter, that it shows up in the tag(I mean, so that the user cant hide that he/she use upload limiter.)
QuoteOriginally posted by PPK
QuoteOriginally posted by Pothead
CZDC is slightly different, because there is no way to tell if it's emulating or not, unless the users are bandwidth limiting as well.  ?(
Good point, fixed :)) Not it always show upload limit in tag if is enabled... most users anyway not use it because up/down ratio in CZDC++ is not good for its connection speed and use netlimiter :D
:)
Title:
Post by: PPK on 16 June, 2005, 16:54:24
QuoteOriginally posted by blackwings
what I meant is, that its not uncommon for czdc++ users to have set their upload limiter on just a few kb/s, seen many dsl users that use czdc++ and limit their upload to just like 2kb/s. So CZDC++ upload limiter is as bad as netlimiter, because it depends on the user on how bad it is.
CZDC++ not allow 2 kB/s upload limit (min is 5 kB/s if user have 1 slot) ;) And if user limit upload then limit own download too :))
Title:
Post by: blackwings on 16 June, 2005, 17:09:51
QuoteOriginally posted by PPK
QuoteOriginally posted by blackwings
what I meant is, that its not uncommon for czdc++ users to have set their upload limiter on just a few kb/s, seen many dsl users that use czdc++ and limit their upload to just like 2kb/s. So CZDC++ upload limiter is as bad as netlimiter, because it depends on the user on how bad it is.
CZDC++ not allow 2 kB/s upload limit (min is 5 kB/s if user have 1 slot) ;) And if user limit upload then limit own download too :))
how much does czdc limit the download if user use uplod limiter? + what is the min ul limit per slot (if user has like 5 slots)?

and has czdc always worked like that?
Title:
Post by: BeeR on 21 June, 2005, 15:43:23
QuoteOriginally posted by blackwings
If I understood PPK and Pothead correctly, this would make a more accurate DC++ only script = --Anti rmDC++ script for PtokaX 0.3.3.0 Lua 5.0.2 by PPK
--CHANGED: modded to become a dc++ only script
----version 1.0

--//Start of Config
Bot = frmHub:GetHubBotName()

DcVer = "0.674"
--//End of Config

function NewUserConnected(curUser)
if not curUser.bOperator then
if curUser.bHasTag then
if curUser.sClient=="DC++" then
if tonumber(curUser.sClientVersion) < tonumber(DcVer) then
curUser:SendData(Bot,"You aren't using DC++, go away")
curUser:Disconnect()
return 1
end
else
curUser:Disconnect()
end
else
curUser:Disconnect()
end
end
end


function SupportsArrival(curUser, sData)
if string.sub(sData, 10, 11) == "  " then
curUser:SendData( Bot.."Buggy client, go away!")
SendPmToNick(Bot, " rmDC++ from IP: "..curUser.sIP.." trying to login... he is his wasting time")
curUser:Disconnect()
return 1
elseif not string.find(sData, "Supports UserCommand NoGetINFO NoHello UserIP2 TTHSearch GetZBlock")then
curUser:SendData( Bot.."You aren't useing DC++, go away")
SendPmToNick(Bot, " Non-DC++ client from IP: "..curUser.sIP.." trying to login... he is his wasting time")
curUser:Disconnect()
return 1
end
end


Hi ,,

Any chance some1 adds redirecting insted of only disconnect a user ??

that would be nice :]
Title:
Post by: Madman on 21 June, 2005, 17:05:56
--Anti rmDC++ script for PtokaX 0.3.3.0 Lua 5.0.2 by PPK
--CHANGED: modded to become a dc++ only script
----version 1.0
-- Moded by Madman
-- Added Redirect option

--//Start of Config
Bot = frmHub:GetHubBotName()

DcVer = "0.674"
Redir = nil -- 1 for on, nil for off
--//End of Config

function NewUserConnected(curUser)
if not curUser.bOperator then
if curUser.bHasTag then
if curUser.sClient=="DC++" then
if tonumber(curUser.sClientVersion) < tonumber(DcVer) then
curUser:SendData(Bot,"You aren't using DC++, go away")
if Redir then
curUser:Redirect(frmHub:GetRedirectAddress())
end
curUser:Disconnect()
return 1
end
else
curUser:SendData(Bot,"You aren't using DC++, go away")
if Redir then
curUser:Redirect(frmHub:GetRedirectAddress())
end
curUser:Disconnect()
end
else
curUser:SendData(Bot,"You aren't using DC++, go away")
if Redir then
curUser:Redirect(frmHub:GetRedirectAddress())
end
curUser:Disconnect()
end
end
end

function SupportsArrival(curUser, sData)
if string.sub(sData, 10, 11) == "  " then
curUser:SendData( Bot.."Buggy client, go away!")
SendPmToNick(Bot, " rmDC++ from IP: "..curUser.sIP.." trying to login... he is his wasting time")
if Redir then
curUser:Redirect(frmHub:GetRedirectAddress())
end
curUser:Disconnect()
return 1
elseif not string.find(sData, "Supports UserCommand NoGetINFO NoHello UserIP2 TTHSearch GetZBlock")then
curUser:SendData( Bot.."You aren't useing DC++, go away")
SendPmToNick(Bot, " Non-DC++ client from IP: "..curUser.sIP.." trying to login... he is his wasting time")
if Redir then
curUser:Redirect(frmHub:GetRedirectAddress())
end
curUser:Disconnect()
return 1
end
end

This should work...
Completly untested!
Title:
Post by: BeeR on 21 June, 2005, 17:52:55
Tack Madman:]

i guess this script wont let the VIP's connect if they dont have DC++ ,, am i right ??
Title:
Post by: GeceBekcisi on 21 June, 2005, 18:29:14
It'll only allow Operators to connect without DC++
Title:
Post by: BeeR on 21 June, 2005, 18:41:59
QuoteOriginally posted by GeceBekcisi
It'll only allow Operators to connect without DC++

And that is not good :(
Vip's should always be unchecked
Title:
Post by: blackwings on 21 June, 2005, 19:25:16
QuoteOriginally posted by BeeR
QuoteOriginally posted by GeceBekcisi
It'll only allow Operators to connect without DC++

And that is not good :(
Vip's should always be unchecked
just change = if not curUser.bOperator thento = if not (curUser.bOperator or curUser.iProfile==2) then
Title:
Post by: BeeR on 21 June, 2005, 20:01:40
QuoteOriginally posted by blackwings
QuoteOriginally posted by BeeR
QuoteOriginally posted by GeceBekcisi
It'll only allow Operators to connect without DC++

And that is not good :(
Vip's should always be unchecked
just change = if not curUser.bOperator thento = if not (curUser.bOperator or curUser.iProfile==2) then

okidoki ,, give it a try

tnx :]
Title:
Post by: BeeR on 24 June, 2005, 01:30:00
--Anti rmDC++ script for PtokaX 0.3.3.0 Lua 5.0.2 by PPK
--CHANGED: modded to become a dc++ only script
----version 1.0
-- Moded by Madman
-- Added Redirect option

--//Start of Config
Bot = frmHub:GetHubBotName()

DcVer = "0.674"
Redir = 1 -- 1 for on, nil for off
--//End of Config

function NewUserConnected(curUser)
   if not (curUser.bOperator or curUser.iProfile==2) then
      if curUser.bHasTag then
         if curUser.sClient=="DC++" then
            if tonumber(curUser.sClientVersion) < tonumber(DcVer) then
               curUser:SendData(Bot,"You aren't using DC++, go away")
               if Redir then
                  curUser:Redirect(frmHub:GetRedirectAddress())
               end
               curUser:Disconnect()
               return 1
            end
         else
            if Redir then
               curUser:Redirect(frmHub:GetRedirectAddress())
            end
            curUser:Disconnect()
         end
      else
         if Redir then
            curUser:Redirect(frmHub:GetRedirectAddress())
         end
         curUser:Disconnect()
      end
   end
end


function SupportsArrival(curUser, sData)
   if string.sub(sData, 10, 11) == "  " then
      curUser:SendData( Bot.."Buggy client, go away!")
      SendPmToNick(Bot, " rmDC++ from IP: "..curUser.sIP.." trying to login... he is his wasting time")
      if Redir then
         curUser:Redirect(frmHub:GetRedirectAddress())
      end
      curUser:Disconnect()
      return 1
   elseif not string.find(sData, "Supports UserCommand NoGetINFO NoHello UserIP2 TTHSearch GetZBlock")then
      curUser:SendData( Bot.."You aren't useing DC++, go away")
      SendPmToNick(Bot, " Non-DC++ client from IP: "..curUser.sIP.." trying to login... he is his wasting time")
      if Redir then
         curUser:Redirect(frmHub:GetRedirectAddress())
      end
      curUser:Disconnect()
      return 1
   end
end

it wont let me in with my dcdm in my own hub ,, i'm redirected =((
[01:24:59] *** Connecting to Xhub.myftp.biz...
[01:24:59] *** Connected
[01:24:59] PtokaXYou aren't useing DC++, go away
[01:24:59] You are redirected to xxx.no-ip.org

i must stop the script to get in
Title:
Post by: blackwings on 24 June, 2005, 02:23:25
try this = --Anti rmDC++ script for PtokaX 0.3.3.0 Lua 5.0.2 by PPK
--CHANGED: modded to become a dc++ only script
----version 1.0
-- Moded by Madman
-- Added Redirect option

--//Start of Config
Bot = frmHub:GetHubBotName()

DcVer = "0.674"
Redir = 1 -- 1 for on, nil for off
--//End of Config

function NewUserConnected(curUser)
if not (curUser.bOperator or curUser.iProfile==2) then
if curUser.bHasTag then
if curUser.sClient=="DC++" then
if tonumber(curUser.sClientVersion) < tonumber(DcVer) then
curUser:SendData(Bot,"You aren't using DC++, go away")
if Redir then
curUser:Redirect(frmHub:GetRedirectAddress())
end
curUser:Disconnect()
return 1
end
else
if Redir then
curUser:Redirect(frmHub:GetRedirectAddress())
end
curUser:Disconnect()
end
else
if Redir then
curUser:Redirect(frmHub:GetRedirectAddress())
end
curUser:Disconnect()
end
end
end


function SupportsArrival(curUser, sData)
if not curUser.bOperator then
if string.sub(sData, 10, 11) == "  " then
curUser:SendData( Bot, "Buggy client, go away!")
SendPmToNick(Bot, " rmDC++ from IP: "..curUser.sIP.." trying to login... he is his wasting time")
if Redir then
curUser:Redirect(frmHub:GetRedirectAddress())
end
curUser:Disconnect()
return 1
elseif not string.find(sData, "Supports UserCommand NoGetINFO NoHello UserIP2 TTHSearch GetZBlock")then
curUser:SendData( Bot, "You aren't useing DC++, go away")
SendPmToNick(Bot, " Non-DC++ client from IP: "..curUser.sIP.." trying to login... he is his wasting time")
if Redir then
curUser:Redirect(frmHub:GetRedirectAddress())
end
curUser:Disconnect()
return 1
end
then
end
Title:
Post by: BeeR on 24 June, 2005, 03:57:44
scripts\DC++only.LUA:62: `end' expected (to close `function' at line 43) near `'