ok then sorry.....mldc script help!
Moderator: Moderators
-
- Posts: 25
- Joined: 2003-08-21 17:09
- Location: Nova Scotia, Canada
- Contact:
ok then sorry.....mldc script help!
the clients are still getting into my hub with the script supposedly running..unless I did something wrong
-
- Posts: 25
- Joined: 2003-08-21 17:09
- Location: Nova Scotia, Canada
- Contact:
some progress...
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?
-
- Posts: 25
- Joined: 2003-08-21 17:09
- Location: Nova Scotia, Canada
- Contact:
here's what I am using...
' 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
' ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
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
if your user begin to have problem to connect.
clean your permanent ban file and set this to false.
clean your permanent ban file and set this to false.
Code: Select all
bPermBan = True '<<--- True = permban every client, False = just kick them
-
- Posts: 53
- Joined: 2003-08-09 10:00
- Location: Wilmington, NC
- Contact:
To stop the double bans, change this:
To this
Kicks for only one reason, then exits.
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
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
-
- Posts: 25
- Joined: 2003-08-21 17:09
- Location: Nova Scotia, Canada
- Contact:
!!!
thanks it worked!!! I also figured out on my own how to just kick them and not ban then