Maxhubs with dc++0.24 check
Moderator: Moderators
-
PiluMinzollaa
- Posts: 2
- Joined: 2003-02-09 12:59
Maxhubs with dc++0.24 check
Hi
I'm looking for some script that check the number of connected hubs with dc++ 0.24... can someone help me? Thanks
I'm looking for some script that check the number of connected hubs with dc++ 0.24... can someone help me? Thanks
-
Marvin
- Posts: 147
- Joined: 2003-03-06 11:56
- Location: France
-
TasMan
- Posts: 196
- Joined: 2003-01-03 13:31
- Location: Canada
If you'd like an example.....here you go!
Code: Select all
Const BOTNAME = "HubBot" 'Name of the bot used in PMs
Const MAXHUBS = 50 'Maximum number of hubs an user can be connected to
Sub DataArival(curUser, sCurData)
If Not curUser.bOperator Then
If LeftB$(sCurData, 14) = "$MyINFO" Then
'$MyINFO $ALL <name> <desc>$ $<conn><char>$<email>$<share>$|
Dim iPos
sCurData = MidB(sCurData, InStrB(1, sCurData, " ") + 2)
sCurData = MidB(sCurData, InStrB(1, sCurData, " ") + 2)
iPos = InStrB(1, sCurData, " ")
sCurData = MidB(sCurData, iPos + 2, InStrB(1, sCurData, "$") - iPos - 3)
iPos = InStrRev(sCurData, "<++")
If iPos Then
Dim iHubs
sCurData = Mid(sCurData, iPos + 4)
iPos = InStrB(1, sCurData, "H:")
sCurData = MidB(sCurData, iPos + 4, InStrB(iPos, sCurData, ",") - iPos - 5)
If InStrB(1, sCurData, "/") Then
Dim aTmp()
aTmp = Split(sCurData, "/")
iHubs = CInt(aTmp(0)) + CInt(aTmp(1))
Else
iHubs = sCurData
End If
If CInt(iHubs) > CInt(MAXHUBS) Then
curUser.PrivateMessage CStr(BOTNAME), "You are connected to too many hubs. The max you can be connected to is " & CStr(MAXHUBS) & "."
frmHub.DoEventsForMe
curUser.Disconnect
End If
End If
End If
End If
End Sub
Shadows Direct Connect Hub - Taking away the light from NMDCH, leaving only shadows.....
-
Animated 0wner
- Posts: 36
- Joined: 2003-04-09 09:04
-
[KUN.NL]mepmuff
- Posts: 73
- Joined: 2003-01-06 14:32
-
TheSaint
- Posts: 3
- Joined: 2003-04-09 15:25
If u use Direct Connect Hub (NMDC Hub) I would advise to get the Generalbot of http://www.gagdet.no-ip.info .
But change one line in the script, unless the new dc version will be blocked...
And further down in the bot :
If you dont change iPolicy(11) to 0 most people with new dc ++ versions cant login and get blocked. And well turn down the "Min Client Version" in "Network Setup" to zero (in the DC Hubsoft).
But change one line in the script, unless the new dc version will be blocked...
Code: Select all
'----------EDITABLE SETTINGS----------
sMinDCPPVersion = "0" '<- Minimum DC++ version (0.175 recommended because there are problems between 0.181 and 0.174 and earlier versions).
And further down in the bot :
Code: Select all
'-----Policies: 0=no action, 1=redirect, 2=disconnect, 3=kick, 4=kick&permban
'-----OLD DCPLUSPLUS-----
sReason(11) = "Your version is accepted, enjoy [F]allen [H]eaven"
iPolicy(11) = 0
If you dont change iPolicy(11) to 0 most people with new dc ++ versions cant login and get blocked. And well turn down the "Min Client Version" in "Network Setup" to zero (in the DC Hubsoft).
-
Marvin
- Posts: 147
- Joined: 2003-03-06 11:56
- Location: France
-
Animated 0wner
- Posts: 36
- Joined: 2003-04-09 09:04
I tried using the above script. There is an error in it somewhere. Any chance one of you could point it out? Oh yes, as for using the General Bot, a friend of mine uses it and it is indeed a very nice bot. But I like my current setup, all I need is a max hubs script that checks for .24+ versions. Thanks for the help guys.
-
TasMan
- Posts: 196
- Joined: 2003-01-03 13:31
- Location: Canada
Oops.....too used to using regular VB
Here it is fixed, in all it's glory!
Here it is fixed, in all it's glory!
Code: Select all
Const BOTNAME = "HubBot" 'Name of the bot used in PMs
Const MAXHUBS = 50 'Maximum number of hubs an user can be connected to
Sub DataArival(curUser, sCurData)
If Not curUser.bOperator Then
If LeftB(sCurData, 14) = "$MyINFO" Then
'$MyINFO $ALL <name> <desc>$ $<conn><char>$<email>$<share>$|
Dim iPos
sCurData = MidB(sCurData, InStrB(1, sCurData, " ") + 2)
sCurData = MidB(sCurData, InStrB(1, sCurData, " ") + 2)
iPos = InStrB(1, sCurData, " ")
sCurData = MidB(sCurData, iPos + 2, InStrB(1, sCurData, "$") - iPos - 3)
iPos = InStrRev(sCurData, "<++")
If iPos Then
Dim iHubs
sCurData = Mid(sCurData, iPos + 4)
iPos = InStrB(1, sCurData, "H:")
sCurData = MidB(sCurData, iPos + 4, InStrB(iPos, sCurData, ",") - iPos - 5)
If InStrB(1, sCurData, "/") Then
Dim aTmp()
aTmp = Split(sCurData, "/")
iHubs = CInt(aTmp(0)) + CInt(aTmp(1))
Else
iHubs = sCurData
End If
If CInt(iHubs) > CInt(MAXHUBS) Then
curUser.PrivateMessage CStr(BOTNAME), "You are connected to too many hubs. The max you can be connected to is " & CStr(MAXHUBS) & "."
frmHub.DoEventsForMe
curUser.Disconnect
End If
End If
End If
End If
End Sub
Shadows Direct Connect Hub - Taking away the light from NMDCH, leaving only shadows.....
-
Animated 0wner
- Posts: 36
- Joined: 2003-04-09 09:04
Thank you! One more question, if you don't mind. I've read that the new versions update the number of hubs a user is connected to every so often. Will the script kick them if they go over my limit, after they've already successfully connected to my hub, when their hub number updates or will it only get them upon entrance?
-
ButterflySoul
- Posts: 210
- Joined: 2003-01-23 22:24
- Location: Nevada
Will the script kick them if they go over my limit, after they've already successfully connected to my hub, when their hub number updates or will it only get them upon entrance?
This script is based on a reception of a $MyInfo string. The feature you are talking about is precisely not to send such a string too often, in order to ease on the hub bandwidth load and the processing load generated by these strings.
That said, if the script receives a string from someone over the limit, it will get rid of them, so yes, it will work if the users' hub number updates; there might just be a small delay between the moment the user actually connected to another hub and the moment it sends an updated string (bout a minute or so).
-
Animated 0wner
- Posts: 36
- Joined: 2003-04-09 09:04
-
TasMan
- Posts: 196
- Joined: 2003-01-03 13:31
- Location: Canada
Sorry....it's a simple problem....as I said before I'm using to regular VB
Find this
and replace that with
Just a stupid mistake, but hey it's free
Find this
Code: Select all
...
If InStrB(1, sCurData, "/") Then
Dim aTmp()
aTmp = Split(sCurData, "/")
...
and replace that with
Code: Select all
...
If InStrB(1, sCurData, "/") Then
Dim aTmp
aTmp = Split(sCurData, "/")
...
Just a stupid mistake, but hey it's free
Shadows Direct Connect Hub - Taking away the light from NMDCH, leaving only shadows.....
-
Animated 0wner
- Posts: 36
- Joined: 2003-04-09 09:04
Who is online
Users browsing this forum: Google [Bot] and 0 guests