ok then sorry.....mldc script help!

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
rcastudios
Posts: 25
Joined: 2003-08-21 17:09
Location: Nova Scotia, Canada
Contact:

ok then sorry.....mldc script help!

Post by rcastudios » 2003-08-21 20:22

the clients are still getting into my hub with the script supposedly running..unless I did something wrong
---
Ryan Amirault
http://www.the-erics.com

rcastudios
Posts: 25
Joined: 2003-08-21 17:09
Location: Nova Scotia, Canada
Contact:

some progress...

Post by rcastudios » 2003-08-21 20:39

ok I got the thing to kick some of these users......they come on for a sec and then are banned....but their name is added to the ban list twice...does this matter?
---
Ryan Amirault
http://www.the-erics.com

TheNOP
Posts: 275
Joined: 2003-07-07 21:41
Location: Quebec

Post by TheNOP » 2003-08-21 20:39

see my reply here
TheNOP

Have you read the FAQ?
Or the sticky ? It might give you idea.

TheNOP
Posts: 275
Joined: 2003-07-07 21:41
Location: Quebec

Post by TheNOP » 2003-08-21 20:42

you should use only one script for this, seem like you run 2
or one is temp ban (nick) the other (IP) ?
TheNOP

Have you read the FAQ?
Or the sticky ? It might give you idea.

rcastudios
Posts: 25
Joined: 2003-08-21 17:09
Location: Nova Scotia, Canada
Contact:

here's what I am using...

Post by rcastudios » 2003-08-21 20:43

' The Good Looking MLDONKEY Filter 2.0 by aDe... [email protected]
' ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

Dim bPermBan

Sub Main()
bPermBan = True '<<--- True = permban every client, False = just kick them
End Sub

Sub DataArival (curUser, sCurData)

If Instr(1, sCurData, "$MyINFO ") Then
CheckUser curUser, sCurData
End If

End Sub

Sub CheckUser (curUser, sCurData)
Dim sDesc, sIp

sDesc = GrabDesc(curUser)

If instr(1, Lcase(sDesc), "mldc client") Then
sIP = curUser.IP
curUser.Kick
If bPermBan Then frmHub.lstPermban.Additem sIp
End If

if cstr(curUser.iBytesShared) = "11534336" then
sIP = curUser.IP
curUser.Kick
If bPermBan Then frmHub.lstPermban.Additem sIp
end if

End Sub

Function GrabDesc(curUser)
GrabDesc = BeforeFirst(AfterFirst(curUser.sMyInfoString, "$ALL " & curUser.sName & " "), "$")
End Function


' String extracting functions, improved and extended by aDe

Function BeforeFirst(sIn, sFirst)
If InStr(1, sIn, sFirst) Then
BeforeFirst = Left(sIn, InStr(1, sIn, sFirst) - 1)
Else
BeforeFirst = ""
End If
End Function

Function AfterFirst(sIn, sFirst)
If InStr(1, sIn, sFirst) Then
AfterFirst = Right(sIn, Len(sIn) - InStr(1, sIn, sFirst) - (Len(sFirst) - 1))
Else
AfterFirst = ""
End If
End Function

Public Function AfterLast(sFrom, sAfterLast)
If InStr(1, sFrom, sAfterLast) Then
AfterLast = Right(sFrom, Len(sFrom) - InStrRev(sFrom, sAfterLast) - (Len(sAfterLast) - 1))
Else
AfterLast = ""
End If
End Function

Public Function BeforeLast(sFrom, sBeforeLast)
If InStr(1, sFrom, sBeforeLast) Then
BeforeLast = Left(sFrom, InStrRev(sFrom, sBeforeLast) - 1)
Else
BeforeLast = ""
End If
End Function
---
Ryan Amirault
http://www.the-erics.com

TheNOP
Posts: 275
Joined: 2003-07-07 21:41
Location: Quebec

Post by TheNOP » 2003-08-21 20:58

if your user begin to have problem to connect.
clean your permanent ban file and set this to false.

Code: Select all

bPermBan = True '<<--- True = permban every client, False = just kick them 
TheNOP

Have you read the FAQ?
Or the sticky ? It might give you idea.

Lightning Man
Posts: 53
Joined: 2003-08-09 10:00
Location: Wilmington, NC
Contact:

Post by Lightning Man » 2003-08-21 20:59

To stop the double bans, change this:

Code: Select all

If instr(1, Lcase(sDesc), "mldc client") Then 
sIP = curUser.IP 
curUser.Kick 
If bPermBan Then frmHub.lstPermban.Additem sIp 
End If 

if cstr(curUser.iBytesShared) = "11534336" then 
sIP = curUser.IP 
curUser.Kick 
If bPermBan Then frmHub.lstPermban.Additem sIp 
end if
To this

Code: Select all

If instr(1, Lcase(sDesc), "mldc client") Then 
sIP = curUser.IP 
curUser.Kick 
If bPermBan Then frmHub.lstPermban.Additem sIp 
Exit Sub
End If 

If cstr(curUser.iBytesShared) = "11534336" then 
sIP = curUser.IP 
curUser.Kick 
If bPermBan Then frmHub.lstPermban.Additem sIp 
Exit Sub
End if
Kicks for only one reason, then exits.

rcastudios
Posts: 25
Joined: 2003-08-21 17:09
Location: Nova Scotia, Canada
Contact:

!!!

Post by rcastudios » 2003-08-21 22:10

thanks it worked!!! I also figured out on my own how to just kick them and not ban then
---
Ryan Amirault
http://www.the-erics.com

Locked