PtokaX forum

Archive => Archived 4.0 boards => Request for Lua 4 scripts => Topic started by: gizmo on 21 January, 2004, 18:44:19

Title: no modemuser
Post by: gizmo on 21 January, 2004, 18:44:19
is their any script who blocks medem users 28.8 and 56.6 users
Title:
Post by: NightLitch on 21 January, 2004, 19:07:46
here taken from my archive:


BotName = "GUARD"

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
Title:
Post by: gizmo on 21 January, 2004, 19:29:07
tnx m8 =)
Title:
Post by: gizmo on 22 January, 2004, 19:53:40
this error comes after a while  


1:  function `strfind' [C]
   2:  function `NewUserConnected' at line 5 [file `...lone grejer1\Potax clone 4\scripts\no_modem.lua
Title:
Post by: kepp on 22 January, 2004, 20:02:48

BotName = "GUARD"

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

if (strfind(cmd,"28.8K")) then
curUser:SendPM(BotName,"no 28.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