antmldonkey 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

granen
Posts: 3
Joined: 2003-01-08 12:28

antmldonkey script

Post by granen » 2003-02-04 00:19

Where can I find a simple antimldonkey script..

like this.. ut I want a script to the orginal DC Hub and not to the PtoKaX hub:

This is to PtoKaX (.lua script)! can anyone rewrite it so it work with the orginal hub software?

Code: Select all

--// Anti mldonkey by JJay - 29.12.2002
--// Ban the following words: mldonkey, [ws], [replika]
forbiddenWords = { "mldonkey" }
botName="antimldonkey"
--// This function is fired at the serving start
function Main()
   frmHub:RegBot(botName)
end

--// This function is fired when a new user finishes the login
function NewUserConnected(curUser)
   for key,checkWord in forbiddenWords do
      if strfind(curUser.sMyInfoString, checkWord, 1, 1) then
         SendToNick(curUser.sName, "<" ..botName .."> You are using unauthorized client software, please read the Rules section, Thankyou!")
         SendToNick(curUser.sName, "<" ..botName .."> Disconnecting...")
         curUser:Disconnect()
      end
   end
end

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

Post by BSOD2600 » 2003-02-04 00:47


TasMan
Posts: 196
Joined: 2003-01-03 13:31
Location: Canada

Post by TasMan » 2003-02-04 00:56

Or rather in VBScript (also by me)

Not sure if it works, but I think it should....

Code: Select all

Dim sBotName

Sub Main()
  sBotName = "DIEMLDonkey"
End Sub

Sub DataArival(curUser, sCurData)
  '$MyINFO $ALL <name> <description>$ $<connection><icon>$<email>$<share>

  If Left(sCurData, 7) = "$MyINFO" Then
    If Mid(sCurData, 14, InStr(14, sCurData, "$") - 15) = "mldonkey client" Then
      curUser.PrivateMessage CStr(sBotName), "You are using the MLDonkey client, which is NOT able to upload yet! Get a real DC client, like DC++, at dcplusplus.sourceforge.net."
      frmHub.DoEventsForMe
      curUser.Disconnect
    End If
  End If
End Sub

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

Post by ender » 2003-02-04 08:04

Don't bother sending them any messages, they will never see them - mldonkey is not an interactive client.

A
Posts: 17
Joined: 2003-02-02 10:55

Post by A » 2003-02-04 10:37

i use something like this to keep them out
Sub DataArival(curUser, sCurData)

If instr(sCurData,"mldonkey") > 0 then
curUser.PrivateMessage Cstr(Botname), "No donkeys allowed"
frmhub.DoEventsForMe
CurUser.Disconnect

Exit Sub
End if
End Sub

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

Post by ender » 2003-02-04 11:15

This will successfully disconnect anybody saying mldonkey in the main chat, including the ops.

aDe
Forum Moderator
Posts: 138
Joined: 2003-01-07 14:14
Location: SE

Post by aDe » 2003-02-04 12:05

haha :)

i made one too a while back. it checks for the mldonkey default share size too.

http://phats0.d2g.com/dctools/GLMLDonkeyFilter2.zip

A
Posts: 17
Joined: 2003-02-02 10:55

Post by A » 2003-02-04 12:17

Be aware that there r new donkeys out there
with mldc in there description

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

Post by ButterflySoul » 2003-02-05 21:41

Aye. The two most common alternative descriptions are "mldc client" and "ml donkey client". I assume those 2 versions are available for download somewhere, since a few people seem to use them.
Share size is typically 11534336, eventhough a few people changed that to a custom number.

MLDonkey is an open source, so you'll always run into a few custom builds here and there, but people tend to keep those builds for themselves, so it's still manageable at human level, with OPs. The only thing you really want to automate with a script would be the 2 distributed versions mentioned above (and the orginal version too, of course).
[CoZ] Children of Zeus
-----
Shadows DC Hub - VBS and JS scripting at their best

TasMan
Posts: 196
Joined: 2003-01-03 13:31
Location: Canada

Post by TasMan » 2003-02-17 17:27

In that case, try this - it uses a select case now, so to add another name do this : Case "mldonkey", "name1", "name2"

Code: Select all

Dim sBotName 

Sub Main()
  sBotName = "DIEMLDonkey"
End Sub

Sub DataArival(curUser, sCurData)
  '$MyINFO $ALL <name> <description>$ $<connection><icon>$<email>$<share>

  If Left(sCurData, 7) = "$MyINFO" Then
    Select Case Mid(sCurData, 14, InStr(14, sCurData, "$") - 15)
      Case "mldonkey", "mldc", "ml donkey client", "mldc client", "edonkey client", "donkey client"
        curUser.PrivateMessage CStr(sBotName), "You are using the MLDonkey client, which is NOT able to upload yet! Get a real DC client, like DC++, at dcplusplus.sourceforge.net."
        frmHub.DoEventsForMe
        curUser.Disconnect
    End Select
  End If
End Sub

granen
Posts: 3
Joined: 2003-01-08 12:28

Thanx

Post by granen » 2003-02-25 21:34

Thanx for the help! =)

bye

Who is online

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