mIRC Home    About    Download    Register    News    Help

Print Thread
Problem with a buffer #79277 14/04/04 09:26 PM
Joined: Jun 2003
Posts: 4
O
Osiris Offline OP
Self-satisified door
OP Offline
Self-satisified door
O
Joined: Jun 2003
Posts: 4
Hey Mates

I'm getting nutz over a problem, and maybe i'm way to tired now, way to stupid or way to blind, but I dun see why this doesn't work.

OK, here is the deal. We are having some problems with @find-floods in a chan, and I'm tired now of all those ppl who dun listen. So I decided to write a lill script, which will handle this, but I'm stuck near at the start.

I'll just post the code now and explain this unbelivable amount of lines after that. wink

<-- start -->
Alias checkflood {
if ( [ % $+ [ puf $+ [ $1 ] ] ] != $null) {
/notice $me [ % $+ [ puf $+ [ $1 ] ] ]
}
else {
set -u10 [ % $+ [ puf $+ [ $1 ] ] ] $nick
}
}

on 1:text:@find*:#enter_chan_u_want:checkflood
<-- end -->

OK, what should this thingy do?

If a person types @find in the chan, a var should be created, which has the name "puf" + the username, for example
set %pufANYNICK ANYNICK

If the nick with the name ANYNICK types @find again within 10 seconds (for now) the script should just send me a notice (for now).

But atm neither the -u10 works, which I guess is why the second problem occurs, and I get a notice if ANY user types @find. I dun know why. but for some reason - as I can see it - its always the same var which is used.

So any ideas where my mistake is?

Re: Problem with a buffer #79278 14/04/04 10:44 PM
Joined: Jun 2003
Posts: 5,024
M
Mentality Offline
Hoopy frood
Offline
Hoopy frood
M
Joined: Jun 2003
Posts: 5,024
Couldn't reaction levels be used?

So if you put this in aliases:

checkflood {
set -u3600 %rl. [ $+ [ $address($nick,2) ] ] $calc( %rl. [ $+ [ $address($nick,2) ] ] + 1)
if (%rl. [ $+ [ $address($nick,2) ] ] == 1) {
set -u10 %puf $+ $nick $nick
}
if (%rl. [ $+ [ $address($nick,2) ] ] == 2) {
notice $me %puf $+ $nick
}
}

Then in remotes:

on *:text:@find*:#channel:{ checkflood }

It would set the variable for 10 seconds the first time they type it, then notice you with the variable the second time they say it. Using the page I linked to earlier you can add further commands for further offences.

Hope this is what you wanted it to do smile

Regards,


Mentality/Chris
Re: Problem with a buffer #79279 15/04/04 03:44 PM
Joined: Jun 2003
Posts: 4
O
Osiris Offline OP
Self-satisified door
OP Offline
Self-satisified door
O
Joined: Jun 2003
Posts: 4
Well, it didnt work out as you posted it, but i've looked at this webpage and with that help I could figure it out. Thanx Mate.

Re: Problem with a buffer #79280 15/04/04 03:49 PM
Joined: Jun 2003
Posts: 5,024
M
Mentality Offline
Hoopy frood
Offline
Hoopy frood
M
Joined: Jun 2003
Posts: 5,024
Ah, sorry, but glad you got it sorted smile

Regards,


Mentality/Chris