Quick fix for GeneralBot and DC++ 0.24

Which hub software is the best? Where can I find script XXX? Discuss it here...(no, this is not for advertising your hub...)

Moderator: Moderators

Locked
Gadget
Posts: 62
Joined: 2003-01-11 06:24
Location: Finland
Contact:

Quick fix for GeneralBot and DC++ 0.24

Post by Gadget » 2003-03-11 13:11

New DC++ gives slot amout as H: x/y/z where

x is count of hubs where user is normal user
y is count of hubs where user is registered user
z is count of hubs where user is operator

That's why generalbot can't get hub count correctly (VBScript functions can't handle string->integer conversions if string contains anything else than numbers)

So, to correct this like it used to work, find this part from the script (from line #322)

Code: Select all

        Case "H:"
          aUD(9)=Mid(sDcpp(i),3)+" (at least)"
          iHubs=CDbl(Mid(sDcpp(i),3))
Add one line after first line:

Code: Select all

        Case "H:"
          If InStr(sDcpp(i),"/")>0 Then sDcpp(i)=Left(sDcpp(i),InStr(sDcpp(i),"/")-1)
          aUD(9)=Mid(sDcpp(i),3)+" (at least)"
          iHubs=CDbl(Mid(sDcpp(i),3))
This should work with earlier generalbots too.

TheRelativ
Posts: 1
Joined: 2003-03-11 10:11

Post by TheRelativ » 2003-03-11 13:47

just call the BeforeFirst Function ;)
If InStr(sDcpp(i),"/") then sDcpp(i)=BeforeFirst(sDcpp(i),"/")

its easier to understand and you dont need to write so much ^^

Gadget
Posts: 62
Joined: 2003-01-11 06:24
Location: Finland
Contact:

Post by Gadget » 2003-03-11 15:23

It's slower

ender
Posts: 224
Joined: 2003-01-03 17:47

Post by ender » 2003-03-11 16:22

heh, i don't even have these functions in my scripts :)

ButterflySoul
Posts: 210
Joined: 2003-01-23 17:24
Location: Nevada
Contact:

Post by ButterflySoul » 2003-03-11 17:45

Unless the user is a VIP in your own hub, you might want to count the total hubs as being x+y though, no ?

This is what I used in Zeus :

Code: Select all

      If Instr(aHubsNSlots(0),"/") > 0 Then
         a024Hubs=Split(aHubsNSlots(0),"/")
         aHubsNSlots(0) = a024Hubs(0) + a024Hubs(1)
      End If
(with aHubsNSlots being the resulting array of an earlier split. 0 holds the hubs and 1 holds the slots)

I'm not sure how what sDcpp holds exactly, but the Split function seems really adapted to the new hub notation, no matter how you were storing the ratio until now =)

I guess some hub owners will probably want to exclude z from the hubs/slots ratio check, and some others will want to include it, but as far as x and y are concerned, according to previous discussions on the topic it seems most people will want to include both values, not simply one of them =)
[CoZ] Children of Zeus
-----
Shadows DC Hub - VBS and JS scripting at their best

Gadget
Posts: 62
Joined: 2003-01-11 06:24
Location: Finland
Contact:

Post by Gadget » 2003-03-11 21:09

I've decided to use only the first value for now, because registered/oped hubs were not counted in earlier versions. Users simply don't use the new version or make their own faked descriptions if it's harder to get in with new tag.

Gadget
Posts: 62
Joined: 2003-01-11 06:24
Location: Finland
Contact:

Post by Gadget » 2003-03-12 03:20

There is also GeneralBot 0.241 available:
- supports H:x/y/z tag
- rules command for users (displays login message)
- hub traffic in hubinfo
- sunet pinger detection

Generalbot-optimized DC++ 0.24 can be found here. It has some right-click commands for operators and two new advanced options:
- ability to switch to normal H:x tag instead of H:x/y/z. Note that all hubs will be counted, even oped (i.e. H:6 instead of H:1/2/3). This feature is only for backwards compability and i suggest using newer tag in future.
- ability to switch narrow tabs on and off

AlleyKat
Posts: 40
Joined: 2003-01-31 15:37
Location: Denmark

Post by AlleyKat » 2003-03-12 05:05

I don't quite get it, ButterflySoul... why would you count x+y but not z? Could it be you're an op a few places? IMHO fair should be fair - if you count the regged, you should also count the ops. :!:

Marvin
Posts: 147
Joined: 2003-03-06 06:56
Location: France
Contact:

Post by Marvin » 2003-03-12 07:41

AlleyKat wrote:you should also count the ops.
Maybe the script user should decide this (with a nice little test on a boolean config var)

Gadget
Posts: 62
Joined: 2003-01-11 06:24
Location: Finland
Contact:

Post by Gadget » 2003-03-12 10:21

I'll add adjustable ratio of each connection type in future versions. i.e. normal hub=1 hub, registered hub=0.5 hubs and oped hub=0 hubs...

ButterflySoul
Posts: 210
Joined: 2003-01-23 17:24
Location: Nevada
Contact:

Post by ButterflySoul » 2003-03-14 06:19

I don't quite get it, ButterflySoul... why would you count x+y but not z?
For the same reason as all the pre-0.24 DC++ counted H as being the hubs where you were an user but not the ones where you were an OP =) (actually, where you were a registered user, which is what the discussion that generated this new notation was all about). I don't remember anyone having a problem with OPs not being counted.

In my own hub, the people I choose as OPs are people who have clean shares, are involved in the hub's life, and are giving a lot of their time to answer questions, help newbies, re-explain 10 times a day why people with passive connection can't get any search results with a client in active mode, check potential fake-shares, and all in all, do an important work for the hub that I could never do myself, but that is critical to keeping the hub enjoyable and running fine.
On top of it, they do it as a benevol thing. I don't pay them for that.

I (foolishly maybe ?) assume that other hub owners do the same when picking their OPs, and that someone OPing in a hub isn't mainly in there to download like crazy, but rather to dedicate a decent part of their time helping the community. That's why I exclude z from the hub count in CoZ.
Could it be you're an op a few places?
Aside from my own hub, I have an OP account in a small friendly private hub, and in all hubs of the network I joined. However, because running your own hub and properly OPing in other hubs at the same time is very demanding, I seldom connect to more than 3 hubs : My own, the private one, and another hub which I particularly like and which is part of the network.

I would tend to agree with you if you meant that H:1/0/10 is abusive, since you can't properly OP in many hubs at the same time *nods*

I have however no personal interest in how hubs are counted in generalbot (or in the rest of the DC community), since the 3 hubs where I hang out is all I need to be happy =)
Furthermore, connecting to additional hubs (even hubs where I'm an OP and where the slot ratio would remain unchanged) means I'll have greater chances of seeing my bandwidth saturated by uploads 24/7 and consequently kill my own hub, since it's running on the same connection. No matter if you include z or not in the hub count, it is against my own interest to connect to many hubs, and it already was before DC++ 0.24

I hope it answers your question...
[CoZ] Children of Zeus
-----
Shadows DC Hub - VBS and JS scripting at their best

DV Bandit
Posts: 2
Joined: 2003-03-15 02:06

Post by DV Bandit » 2003-03-15 02:15

Personnally I thought idea of expanded <++ tag to just piss me off as our hub scripter,u got ur B,`s ur L:`s, and all kinds other new tags sprouten up..makes it a continuous pain in ars to edit or add a line or 2 to ur script to regulate such things....After careful consideration though and the way new tag has been broken down..i like it..I like fact that H: count can monitor registered and op users in your hub..before count didnt go up so if users was registered or op in other hub count didnt go up..which i beleive is a way of cheating,a hub owner has a hub count for a reason,and thus becoming a rule,I beleive that should be respected,and with new hub tag doing so i very much in agreement,just would of been nice that it wasn`t just thrown out there,given hubs time to build a script or tidy up ones they run to handle it,ooh well,thats my novel on the subject..

AlleyKat
Posts: 40
Joined: 2003-01-31 15:37
Location: Denmark

Post by AlleyKat » 2003-03-16 20:32

I see the idea, ButterflySoul... but as you mention, it doesn't do any difference anyway. But - generally - never mind me. I'll just be using an older client if I feel like it anyway. It will be eternities before all hubs have updated their scripts, and there's prolly more changes to come anyway, hehe...
It's just nobody's business if/how many private hubs I'm connected to. And so it will remain. :D

AlleyKat
Posts: 40
Joined: 2003-01-31 15:37
Location: Denmark

Post by AlleyKat » 2003-03-16 20:45

BTW (OFF TOPIC - I KNOW) - I generally think there are too many lazy ops out there, its not unusual to see ops chat away with eachother, letting users handle help among themselves. I'm quite a bit more active on the assisting side than most ops I know, anyway. I know it's all up to the hub owners... but if so many use the Op way of letting their friends in (look in any Asgard hub - there's at least 10 ops at all times) I think the entire idea of the above is pretty feeble anyway.

And don't get all high and mighty over the kicking and sharefakerchecking - I rarely meet a hub where there's more than a few kicks per op per hour. And just as often see users noticing ops of sharefakers. Big respect to those who bother to do it ofcourse!! But don't make it sound like the OP way is better than the Private-way. It'll just increase the Op-begging to intolerable levels imho.

I don't op in any public hubs. I can help other users just as good being a user myself.

sarf
Posts: 382
Joined: 2003-01-24 05:43
Location: Sweden
Contact:

Post by sarf » 2003-03-17 16:11

Just to do some shameless plugging for my new and improved DC++k version - it has the ability to show the H: "As It Was Meant To Be Shown" (tm) as well as the ability to emulate 0.233 (or, indeed, any other DC++ version) to get past the stupid scripts that block 0.24 because it "looks different". And some other stuff (as always). Just press that www button below... Come on, you know you want to! :)

Sarf
---
"Jesus (briefly) died for your sins" - Daniel Rutter

Gadget
Posts: 62
Joined: 2003-01-11 06:24
Location: Finland
Contact:

Post by Gadget » 2003-03-17 21:23

sarf wrote:Just to do some shameless plugging for my new and improved DC++k version
Looks like a "permban on sight" version of dc++

Locked