Anti Modem Bot
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

Anti Modem Bot

Started by witch, 08 August, 2004, 00:12:12

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

witch

Hi guys!
I use this script for stoping modem users come on the hub, working fine!

------------------------------------------------------------------------------------------------------------------------------------------------


BotName = "KillModem"

function NewUserConnected(curUser)
    data=curUser.sMyInfoString
    s,e,cmd = strfind( data, "[$]+[^$]+[$]+[^$]+[$]+[^$]+[$]+([^$]+)" )

if (strfind(cmd,"28.8K")) then
curUser:SendPM(BotName,"no28.8 modem allowed in here ...")
curUser:Disconnect()
end
if (strfind(cmd,"33.6K")) then
curUser:SendPM(BotName,"no 33.6k modem allowed in here ...")
curUser:Disconnect()
end
if (strfind(cmd,"56K")) then
curUser:SendPM(BotName,"no 56k modem allowed in here ...")
curUser:Disconnect()
end
if (strfind(cmd,"ISDN")) then
curUser:SendPM(BotName,"no ISDN allowed in here ...")
curUser:Disconnect()
end
end

------------------------------------------------------------------------------------------------------------------------------------------------

But as soon is user inside the hub he can change it to modem on general settings of them client with out any problem, and still stays on the hub. So any sugestions how can i stop it?

Thanx



plop

try this 1.
optimized it a bit also.
BotName = "KillModem"

function NewUserConnected(curUser)
   data=curUser.sMyInfoString
   s,e,cmd = strfind( data, "[$]+[^$]+[$]+[^$]+[$]+[^$]+[$]+([^$]+)" )

   if (strfind(cmd,"28.8K")) then
      curUser:SendPM(BotName,"no28.8 modem allowed in here ...")
      curUser:Disconnect()
   elseif (strfind(cmd,"33.6K")) then
      curUser:SendPM(BotName,"no 33.6k modem allowed in here ...")
      curUser:Disconnect()
   elseif (strfind(cmd,"56K")) then
      curUser:SendPM(BotName,"no 56k modem allowed in here ...")
      curUser:Disconnect()
   elseif (strfind(cmd,"ISDN")) then
      curUser:SendPM(BotName,"no ISDN allowed in here ...")
      curUser:Disconnect()
   end
end

function DataArrival(curUser, data)
   if curUser.bOperator == nil then
      NewUserConnected(curUser)
   end
end

plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

witch

Thanx dude! Now it's working much better, all my cheaters was kicked off :))



witch

oooooooooopssss......i was too quick with answer:

Syntax error: bad argument #1 to `strfind' (string expected, got nil)
stack traceback:
   1:  function `strfind' [C]
   2:  function `NewUserConnected' at line 9 [file `D:\PtokaX\NEW\scripts\modem.lua']
   3:  function `DataArrival' at line 47 [file `D:\PtokaX\NEW\scripts\modem.lua']



BeeR

QuoteOriginally posted by plop
try this 1.
optimized it a bit also.
BotName = "KillModem"

function NewUserConnected(curUser)
   data=curUser.sMyInfoString
   s,e,cmd = strfind( data, "[$]+[^$]+[$]+[^$]+[$]+[^$]+[$]+([^$]+)" )

   if (strfind(cmd,"28.8K")) then
      curUser:SendPM(BotName,"no28.8 modem allowed in here ...")
      curUser:Disconnect()
   elseif (strfind(cmd,"33.6K")) then
      curUser:SendPM(BotName,"no 33.6k modem allowed in here ...")
      curUser:Disconnect()
   elseif (strfind(cmd,"56K")) then
      curUser:SendPM(BotName,"no 56k modem allowed in here ...")
      curUser:Disconnect()
   elseif (strfind(cmd,"ISDN")) then
      curUser:SendPM(BotName,"no ISDN allowed in here ...")
      curUser:Disconnect()
   end
end

function DataArrival(curUser, data)
   if curUser.bOperator == nil then
      NewUserConnected(curUser)
   end
end

plop

Hello Mr Plop :]

can you change all disconnect to: read rd adress from the hub insted??

Best Regards
A cold BeeR is stunning !!

plop

#5
this should be fixed now witch, but as you might see i optimized it a bit more.
this could cause a new bug but i'm not expecting them.

beer if you change the 1 behind disconnect to a nil it should start 2 redirect.
but only on old clients as this feature has been removed on the latest dc++ versions.
-- no modem
-- original by ....... (no idea)
-- optimized and redirect option added by plop

BotName = "KillModem"
-- use any vallue to use the disconnect, and "nil" to make it redirect.
disconnect = 1

tBadCon = {
   ["ISDN"] = 1,
   ["56Kbps"] = 1,
   ["33.6Kbps"] = 1,
   ["28.8Kbps"] = 1
}

function NewUserConnected(curUser)
   if curUser.sMyInfoString then
      local s,e,cmd = strfind(curUser.sMyInfoString, "[$]+[^$]+[$]+[^$]+[$]+[^$]+[$]+([^$]+)" )
      if cmd then
         cmd = strsub(cmd, 1,-2)
         if tBadCon[cmd] then
            curUser:SendPM(BotName,"no "..cmd.." modem allowed in here ...")
            if disconnect then
               curUser:Disconnect()
            else
               curUser:SendData(" You are being redirected ... |$ForceMove "..frmHub:GetRedirectAddress().."|")
            end
         end
      end
   end
end

function DataArrival(curUser, data)
   if curUser.bOperator == nil then
      NewUserConnected(curUser)
   end
end

plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

witch

Much better now! Thanx Plop dude  :P



Herodes

Something tells me I dont like this script ... lol

witch

..don't look at it ....lol  :D  :D  :D



Herodes

I am gonna cry !!!! stupid greek communication networks are not giving a damn about getting us junkies up-to-speed ... :((((((((((((((

witch: not only I saw it ... I collect as well :D

good work plop ..

UwV

#10
well i just wonder what is your problem with modemusers anyway ? ..
like anybody out there is happy to be a modem user ?
and would not upgrade their connection if they where able to ..  ..
just slot/hub ratio checking is much nicer ... in my opinion anyway ..
\NL   The knowledge and skills you have achieved are meant to be forgotten so you can float comfortably in emptiness, without obstruction.
" Holly loves me,...  . "      ;o)

& don't forget, the motto is :
  -- SUPPORT YOUR LOCAL DJ'S --

VERMiN

Just sucks when your queue consist of modem users which take up valueble d/l slot's ;-)
The damned creator of [-MORBID-].  \" A damn fine security script \" [/COLOR]


HOMEPAGE
E-mail

SMF spam blocked by CleanTalk