stripped from ai bot and bit modified.
haven't tested this as a stand alone script but in ai it's definatly working.
as kicking of mldc is hard 2 nearly imposible i made this as a backup.
it shows (or should show) there ip into the opchat so the op's can ban that.
it's running for a few day's now in the vikings hub and the amount of mldc reports is cleary going down.
function NewUserConnected(user)
local i,j,mldc = strfind(user.sMyInfoString, "$(%d+)%$")
if strfind(user.sMyInfoString, "mldonkey", 1, 1) or strfind(user.sMyInfoString, "mldc", 1, 1) or (tonumber(mldc) ==11534336) then
user:SendData(Bot, "All mlDonkey traces cause disconnection ... begone foul swine ... |")
SendPmToOps(frmHub:GetOpChatName(), "mldc user: "..user.sName.." is friendly begging for his IP to be banned: "..user.sIP.."|")
user:Disconnect()
return 1
end
end
plop
another anti - mldonkey script
donkey get kicked in dataarrival - no ip showed
function DataArrival(user,data)
if strfind(data,"$MyINFO",1,1) then
forbiddenWords = { "mldonkey","mldc","11534336" }
for key,checkWord in forbiddenWords do
if strfind(data, checkWord, 1, 1) then
user:Disconnect()
end
end
end
end
hey peeps. I have had troubles with MLDC (as all hub owners do). I have found that rather than kicking them upon the sending of the MyInfoString, it is best to use the $MyINFO command straight from the hubsoft as [NL]Pur has. It seems to work better and takes less hub resources. just thought I would add my 2 cents hehe.
BTW: I run Pur's version, and to this date...have NO MLDC clients. Good Job Pur!
I can't really believe that checking in DataAarrival for $MyInfo takes less resources that checking on NewUserConnected(). Only difference is maybe that it gets rid of mldcs faster...
there were no mldc clients in our hub's, but by banning there ip's the bot has it more relax. lol
that definatly takes less resources, and that was the idea i had when i made it like this.
the ip ban is handled by ptokax so the bot does nothing. lol
still cool 2 see how pur handled it.
only 1 thing left 2 say, use the 1 you like most.
plop
QuoteOriginally posted by plop
stripped from ai bot and bit modified.
haven't tested this as a stand alone script but in ai it's definatly working.
as kicking of mldc is hard 2 nearly imposible i made this as a backup.
it shows (or should show) there ip into the opchat so the op's can ban that.
it's running for a few day's now in the vikings hub and the amount of mldc reports is cleary going down.
function NewUserConnected(user)
local i,j,mldc = strfind(user.sMyInfoString, "$(%d+)%$")
if strfind(user.sMyInfoString, "mldonkey", 1, 1) or strfind(user.sMyInfoString, "mldc", 1, 1) or (tonumber(mldc) ==11534336) then
user:SendData(Bot, "All mlDonkey traces cause disconnection ... begone foul swine ... |")
SendPmToOps(frmHub:GetOpChatName(), "mldc user: "..user.sName.." is friendly begging for his IP to be banned: "..user.sIP.."|")
user:Disconnect()
return 1
end
end
plop
Can someone not write a script with a automaticly BAN.
No IP adresses at the OPCHAT but an inmediatly BAN!!
Much better then collect ip adresses.
This should do it
function NewUserConnected(user)
local i,j,mldc = strfind(user.sMyInfoString, "$(%d+)%$")
if strfind(user.sMyInfoString, "mldonkey", 1, 1) or strfind(user.sMyInfoString, "mldc", 1, 1) or (tonumber(mldc) ==11534336) then
user:SendData(Bot, "All mlDonkey traces cause disconnection ... begone foul swine ... |")
SendPmToOps(frmHub:GetOpChatName(), "mldc user: "..user.sName.." is friendly begging for his IP to be banned: "..user.sIP.."|")
user:Ban()
return 1
end
end
QuoteOriginally posted by [NL]Portal
Can someone not write a script with a automaticly BAN.
No IP adresses at the OPCHAT but an inmediatly BAN!!
Much better then collect ip adresses.
problem on mldc is that there description is part of there name.
for example your client shows user name: "klaasje" description: "mldc", then there full name is actualy "klaasje mldc".
mldc clients aren't following the dc protocol with that space in the nick.
thats why i came up with the idea of reporting there ip's 2 be banned.
but good news, the 0.3.3.0 beta of ptokax kicks all there asses, just put a min share of 12MB or higher.
plop
But the Best is just making 12MB minimum share in ur hub right ?
QuoteOriginally posted by Intel
But the Best is just making 12MB minimum share in ur hub right ?
ptokax checks 1st so thats indeed the fastest/best.
but on testdrive and earlyer versions you still see them show up reguarly.
there way of login in isn't what you can call friendly.
plop
btw ppl checking the tag is no longer valid, just because they say mldc doesnt mean they dont share ;)
so technically atm just setting 12mb is probably the best way of doing it for now ;)
Im having a mldoneky problem in my hub atm aswel, exept it isnt ptokax ;-)
trying to hardcode it into the server and for some reason they dont bugger off, so instead of posting c++ code here, ill just ask, is the only way to find a mldonkey is by description saying mldc/mldonkey and share size being 11mb?
this works perfekt
function DataArrival(user,data)
if strfind(data,"$MyINFO",1,1) then
forbiddenWords = { "mldonkey","mldc","11534336" }
for key,checkWord in forbiddenWords do
if strfind(data, checkWord, 1, 1) then
user:Disconnect()
end
end
end
ok never mind it does work ^^