PtokaX forum

Archive => Archived 5.0 boards => Help with scripts => Topic started by: Leun on 16 September, 2005, 14:01:27

Title: client checker
Post by: Leun on 16 September, 2005, 14:01:27
I'm trying modify a script, but i'm stok with this

it is the script from filechecker


-- kick user
if match and not client.bOperator then
if client:Kick() = nill then
client:Kick() = 0
end
if client:Kick() = 3 then
client:SendData(Bot, "You are been banned for 3 kicks.")
client:TimeBan(48*60)
client:Kick() = 0

function DataArrival(client, data)

if string.find(data,"is kicking") then
local _,_, name = string.find(data,"%b<>%s*%S+%sis%skicking%s(%S+)%sbecause:%s")
kick[client] = kick[client] + 1
end
end

Why doesn't it work I get this message:

\scripts\checker.lua:186: `then' expected near `='

Hopefully someone can help me
Title: I guess this is the problem....
Post by: Myers on 16 September, 2005, 14:29:53
Change this:

if client:Kick() = nill then


To:

if client:Kick() = nil then

I hope this will help you.
Title: doesn't work
Post by: Leun on 16 September, 2005, 20:52:12
thnx for your fast reply,

but is doesn't work. I get the same fault.

\scripts\checker.lua:186: `then' expected near `='

it is in this rule:
if client:Kick() = nill then
Title:
Post by: effgjamis on 16 September, 2005, 21:08:31
QuoteOriginally posted by Leun

it is in this rule:
if client:Kick() = nill then

I think what Myers is saying.. you have a mispelled
word..

" nill  "  should be " nil  "

and I am no LUA scripter.. but that is what I read..
Title:
Post by: Leun on 16 September, 2005, 21:11:11
sorry my fault,

I typed it wrong second time.
 
it has to be;

but is doesn't work. I get the same fault.

\scripts\checker.lua:186: `then' expected near `='

it is in this rule:
if client:Kick() = nil then
Title:
Post by: mateci on 17 September, 2005, 00:23:58
if client:Kick() = nill then

if client:Kick() = 3 then

must be

if client:Kick() == nil then

if client:Kick() == 3 then
Title: it works :D
Post by: Leun on 17 September, 2005, 05:48:51
Thnx Mateci,

It works :D

Only I got a new problem with that script:

I have this atm:

-- disconnect user
if match and not client.bOperator then
client:SendData( "<"..botName.."> You are temporarily banned for 5 min! Fix your share.." )

if client:Kick() == nil then
client:Kick()
end
if client:Kick() == "3" then
client:SendData(Bot, "You are been banned for 3 kicks.")
client:TimeBan(48*60)
client:Kick()

function DataArrival(client, data)

if string.find(data,"is kicking") then
local _,_, name = string.find(data,"%b<>%s*%S+%sis%skicking%s(%S+)%sbecause:%s")
client:Kick() == client:Kick() + 1
end
end

With this message:

\checker.lua:17: unexpected symbol near `=='

I think it's the Kick() +1 ,but I dont know where how change it.
Title:
Post by: Dessamator on 17 September, 2005, 09:36:17
This :

client:Kick() == client:Kick() + 1

is wrong, it should be like this :

client:Kick() = client:Kick() + 1
Title: thnx,
Post by: Leun on 25 September, 2005, 16:39:47
thnx for your help Dessamator,
but I can't get it work....
Title:
Post by: Dessamator on 25 September, 2005, 18:10:26
well, for starters that script doesnt seem complete, and from what i can see it seems to be for lua4, there are quite a few scripts with the features u want from that, maybe if u search ull find what u need .
Title:
Post by: Leun on 25 September, 2005, 19:37:34
you're right....

thnx for your help
Title: hello ppl
Post by: LiqUiD~TrolL on 26 September, 2005, 02:59:04
hello m8 ,why you don t just use DCDM++ it s really great client and it auto checks and kicks users with all stuff you want to add it as forbiten


or just try robocop ,it is auto kick after 2 warnings and auto bann after 3 kicks ;-)

Have A look :
DCDM++ (http://dialspace.dial.pipex.com/town/pipexdsl/s/asmr89/dcpluspluskcdm/)
Title:
Post by: bastya_elvtars on 26 September, 2005, 03:05:17
QuoteOriginally posted by LiqUiD~TrolL
hello m8 ,why you don t just use DCDM++ it s really great client and it auto checks and kicks users with all stuff you want to add it as forbiten


or just try robocop ,it is auto kick after 2 warnings and auto bann after 3 kicks ;-)

Have A look :
DCDM++ (http://dialspace.dial.pipex.com/town/pipexdsl/s/asmr89/dcpluspluskcdm/)

I think the autodetection of fake tags serverside is a good idea since it avoids a lot of bandwidth usage.
Title: Thnx a lot
Post by: Leun on 03 October, 2005, 10:11:05
Thnx for your help m8s

My script is done now :D
I use now the adls search
and the Ban-4X-Kick 1.0 LUA 5 script

Thnx for your help,
greetz