AntiMLDonkey.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

JackDanuls
Posts: 10
Joined: 2003-06-06 03:50

AntiMLDonkey.script

Post by JackDanuls » 2003-06-09 14:40

Does any one know of an AntiMLDonkey.script script I can emplement? I keep getting people with MLDC clients in my hub and they all say they are sharing 11mb and no one can download there list of shares

BSOD2600
Forum Moderator
Posts: 503
Joined: 2003-01-27 23:47
Location: USA

Post by BSOD2600 » 2003-06-09 16:46

I've used this one in the past

Code: Select all



' The Good Looking MLDONKEY Filter 2.0                   by aDe...     ade_n84@hotmail.com
' ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

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), "mldonkey client") Then
  sIP = curUser.IP
  curUser.Kick 
  If bPermBan Then frmHub.lstPermban.Additem sIp
End If

if cstr(curUser.iBytesShared) = "10000000000" 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

JackDanuls
Posts: 10
Joined: 2003-06-06 03:50

Post by JackDanuls » 2003-06-09 16:57

Thanks. I have it and it works.

Who is online

Users browsing this forum: Google [Bot] and 0 guests