mIRC Homepage
Posted By: Avlor kick on 2nd @find? - 29/11/03 03:27 PM
Hi!

I'm new to scripting. I understand how to use the "on:...:text:" to kick someone if they do an at find. Is there a way to keep track - say if I wanted to kick on the second @find (give them a warning first). Or is that way more complicated than I imagined?

thanks!

Avlor
Posted By: Knappen Re: kick on 2nd @find? - 29/11/03 04:22 PM
Would you like to have a sertian time on that event? Like kick on @find if the same user says it it more than once within.. say 1 min?

Code:
on *:text:*:#:{
if ($1 == @find) {
if ($wildsite == %wildsite [ $+ [ $wildsite ] ]) { ban -k $chan $nick 2 <your msg here> | halt }
else {
notice $nick <your msg here>
set -u60 %wildsite [ $+ [ $wildsite ] ] $wildsite
}
}   
}
Posted By: Avlor Re: kick on 2nd @find? - 29/11/03 04:29 PM
Setting a time on it is one idea I thought of - but had no idea how to implement it. I'll play with what you posted and see what I can do with it.

thanks!!!!

Avlor
Posted By: Avlor Re: kick on 2nd @find? - 03/12/03 04:19 AM
Hi,

I'm having trouble understanding what the "%wildsite [ $+ [ $wildsite ] ] $wildsite" in the "set" line does and what the "%wildsite [ $+ [ $wildsite ] ]" in the "if" line does. Can you explain it? (Please. I'm feeling pretty stupid right now.)

thanks!

Avlor
Posted By: Avlor Re: kick on 2nd @find? - retrying... - 03/12/03 02:26 PM
ok - here is what I have so far...but I would like to use an exact match (i.e. with $findtok or something like that), so say the user akaikitsune doesn't get kicked of akaikitsune2 does the first @find.

ON @1:TEXT:@find*:#: {
; V here akaikitsune is kicked if akaikitsune2 does the first @find
if ($nick isin %wildsite) {
; if ($findtok(%wildsite,$nick,46) { <-I couldn't get this to work
/msg $chan nick: $nick
/msg $chan wildsite2 : $wildsite(*)
/kick # $nick 4NO @FIND HERE! | /unset %wildsite | halt
}
else {
/msg $chan 4 $me has eyes in the back of her head. I SAW THAT attempt at @find. Tsk tsk tsk.
/msg $chan 4 Read the !rules. NO @find in this channel. Use !list, please!
/msg $chan 4 If you do it again you'll be kicked and banned.
set -u10 %wildsite $addtok(%wildsite,$nick,46)
/msg $chan nick: $nick
/msg $chan wildsite : %wildsite
/msg $chan test: $findtok(%wildsite,$nick,46)
}

}

thanks!

Avlor
Posted By: Avlor Re: kick on 2nd @find? - retrying... - 03/12/03 02:58 PM
Yay Yay! I found my syntax error in the findtok line (needed a ")" at the end of the if). It works it works!

happy dance!

Thanks for the idea!

Avlor
© mIRC Discussion Forums