DC++ Slot script

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
SBSoftEA
Posts: 20
Joined: 2003-01-03 12:29

DC++ Slot script

Post by SBSoftEA » 2003-01-03 17:21

even works with that O:

Code: Select all

dim firsttimer
dim secondtimer
Sub DataArival(index, sCurData)
dim seb
dim hub
dim slot
dim maxhubs
dim minslotperhub
dim maxslots
dim kick
Dim botname
if index.boperator = true then exit sub
botname = "Subzero"
maxhubs = 5
minslotperhub = 1
maxslots = 15
kick = "false"
if instr(lcase(scurdata),lcase("$MyInfo")) <> 0 then
seb = left(scurdata,instr(scurdata,"$ $") -1)
if right(seb,1) = ">" then

seb = right(seb,len(seb) - instr(scurdata,"<++ ") -3)
do while true
if instr(seb, "<++") = 0 then 
exit do
end if
seb = right(seb,len(seb) - instr(seb,"<++")-3)
loop
hub = left(seb,instr(seb, ",S:") -1)
hub = right(hub, len(hub) - instr(hub, "H:") -1)
if instr(seb, "O:") then
slot= left(seb,instr(seb, "O") -1)
else
slot= left(seb,instr(seb, ">") -1)
end if
slot = right(slot, len(slot) - instr(slot, "S:") -1)

if int(hub) > maxhubs then
index.SendChatMessage cstr(botname), "The hub limit is " & maxhubs & ". You are in " & hub & ".That's too much, so close some before you get back"
kick = "true"
end if
if int(slot) > maxslots then
index.SendChatMessage cstr(botname), "The slot limit is " & maxslots & ". You have " & slot & ".That's too much, so close some before you get back"
kick = "true"
end if
seb1 = int(hub)
seb2 = int(slot)
if seb2/seb1 < minslotperhub  then
index.SendChatMessage cstr(botname), "You are suppossed to have " & minslotperhub & " slots per hub, but you are in " & hub & " hub and only have " & slot & " slots open. So open " & minslotperhub * hub & " slots and try again!"
kick = "true"
end if
if kick = "true" then
if instr(firsttimer, "|" & index.sname & "|") <> 0 then
firsttimer = Replace(firsttimer, index.sname, "", 1, -1, 1)
secondtimer = secondtimer & "|" & index.sname & "|"
elseif instr(secondtimer, "|" & index.sname & "|") <> 0 then
secondtimer = Replace(secondtimer, index.sname, "", 1, -1, 1)
index.SendChatMessage cstr(botname), "This is your third offense, therefore, you get a permban!"
frmHub.lstPermBan.addItem index.ip
else
firsttimer = firsttimer & "|" & index.sname & "|"
end if
frmhub.DoEventsForMe
index.kick
else
index.SendChatMessage cstr(botname), "Welcome " & index.sname & "! You are using DC++ and are in " & hub & " hubs and have " & slot  & " slots open."
end if
end if
end if
end sub
and for all you SBHub users ;)

Code: Select all

dim firsttimer
dim secondtimer
Sub DataArival(index, sCurData)
dim seb
dim hub
dim slot
dim maxhubs
dim minslotperhub
dim maxslots
dim kick
Dim botname
if index.boperator = true then exit sub
botname = "Subzero"
maxhubs = 5
minslotperhub = 1
maxslots = 15
kick = "false"
if instr(lcase(scurdata),lcase("$MyInfo")) <> 0 then
seb = left(scurdata,instr(scurdata,"$ $") -1)
if right(seb,1) = ">" then

seb = right(seb,len(seb) - instr(scurdata,"<++ ") -3)
do while true
if instr(seb, "<++") = 0 then 
exit do
end if
seb = right(seb,len(seb) - instr(seb,"<++")-3)
loop
hub = left(seb,instr(seb, ",S:") -1)
hub = right(hub, len(hub) - instr(hub, "H:") -1)
if instr(seb, "O:") then
slot= left(seb,instr(seb, "O") -1)
else
slot= left(seb,instr(seb, ">") -1)
end if
slot = right(slot, len(slot) - instr(slot, "S:") -1)

if int(hub) > maxhubs then
index.SendChatMessage cstr(botname), "The hub limit is " & maxhubs & ". You are in " & hub & ".That's too much, so close some before you get back"
kick = "true"
end if
if int(slot) > maxslots then
index.SendChatMessage cstr(botname), "The slot limit is " & maxslots & ". You have " & slot & ".That's too much, so close some before you get back"
kick = "true"
end if
seb1 = int(hub)
seb2 = int(slot)
if seb2/seb1 < minslotperhub  then
index.SendChatMessage cstr(botname), "You are suppossed to have " & minslotperhub & " slots per hub, but you are in " & hub & " hub and only have " & slot & " slots open. So open " & minslotperhub * hub & " slots and try again!"
kick = "true"
end if
if kick = "true" then
if instr(firsttimer, "|" & index.sname & "|") <> 0 then
firsttimer = Replace(firsttimer, index.sname, "", 1, -1, 1)
secondtimer = secondtimer & "|" & index.sname & "|"
elseif instr(secondtimer, "|" & index.sname & "|") <> 0 then
secondtimer = Replace(secondtimer, index.sname, "", 1, -1, 1)
index.SendChatMessage cstr(botname), "This is your third offense, therefore, you get a permban!"
frmHub.BanIP index.ip
else
firsttimer = firsttimer & "|" & index.sname & "|"
end if
index.kick
else
index.SendChatMessage cstr(botname), "Welcome " & index.sname & "! You are using DC++ and are in " & hub & " hubs and have " & slot  & " slots open."
end if
end if
end if
end sub

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

Post by ender » 2003-01-03 18:10

What's SBhub? Another hub with VBScript support?

SBSoftEA
Posts: 20
Joined: 2003-01-03 12:29

Post by SBSoftEA » 2003-01-03 18:31

yep exactly, made by litttle me =D

[DK][TIC]Icemanâ„¢
Posts: 2
Joined: 2003-01-03 11:04
Location: Denmark
Contact:

Do I know you SBSoftEA *LOL*

Post by [DK][TIC]Icemanâ„¢ » 2003-01-03 19:55

Hey M8 nice to see you here too :D
Regards Icemanâ„¢ from icewife.no-ip.org

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

Post by ender » 2003-01-04 06:00

Where can we get it? :)

Atomic Jo
Posts: 62
Joined: 2003-01-04 03:50
Location: Québec, Canada
Contact:

Post by Atomic Jo » 2003-01-05 02:09


Roxita
Posts: 6
Joined: 2003-01-05 22:58

Post by Roxita » 2003-01-06 00:11

When I try to acces to http://www.sbhub.tk/ the page is white. Only sais:
Boe!

I have a los of problemm with the redirection .tk, could you post a mirror?

Thanks

Roxita
Posts: 6
Joined: 2003-01-05 22:58

Post by Roxita » 2003-01-06 00:14

Sorry, I mean a lot of problems

Atomic Jo
Posts: 62
Joined: 2003-01-04 03:50
Location: Québec, Canada
Contact:

Post by Atomic Jo » 2003-01-06 04:15


Roxita
Posts: 6
Joined: 2003-01-05 22:58

Post by Roxita » 2003-01-06 13:58

Thanks, I'll try it :D

RobbeZ
Posts: 17
Joined: 2003-01-07 00:09

Post by RobbeZ » 2003-01-07 09:24

both URLs work just fine over here :o

http://www.subdimension.com/userpages/s ... /index.htm
http://www.sbhub.tk/

very nice btw 8)
Codito Ergo Sum

OLDoMiNiON
Posts: 202
Joined: 2003-01-06 06:22
Location: Salford, England.
Contact:

Post by OLDoMiNiON » 2003-01-07 12:05

yeh, there was a problem with almost all .tk address' recently... nothing to do with the website itself..

SBSoftEA
Posts: 20
Joined: 2003-01-03 12:29

Post by SBSoftEA » 2003-01-07 12:45

http://sbhub.no-ip.org works as well
but the current version is not that good, compared to the next one i am making =D
No majaor GUI changes, but the speed.... =D
wait and see

[MASTER]Spookie
Posts: 42
Joined: 2003-01-03 10:04

Post by [MASTER]Spookie » 2003-01-07 13:34

I´m waiting so i can post you some bug reports ;)

Roxita
Posts: 6
Joined: 2003-01-05 22:58

Post by Roxita » 2003-01-08 00:27

I like a lot your hub, SBSoftEA
Very Good work
I had problems with my firewall when I tested it, so I couldn't proof the memory as I wanted ...
I'm Really impatient for the next version :P

SBSoftEA
Posts: 20
Joined: 2003-01-03 12:29

Post by SBSoftEA » 2003-01-15 15:29

well might still take a while longer, since i still have a few problems getting things the way i want em, but once i get it working, i promise it will be better then ever!

SBSoftEA
Posts: 20
Joined: 2003-01-03 12:29

Post by SBSoftEA » 2003-01-20 08:38

if anyone is interested, we are running a test hub @ seabass.no-ip.org:413 today (monday the 20th of january) to test the new networking code. So if you wanna come, you are welcome :D . But don't redirect any users there ;) my connection is slow. The hub is not permanet, probably only up today and maybe this weekend, but still come!

Locked