mIRC Home    About    Download    Register    News    Help

Print Thread
#253277 07/06/15 06:57 AM
Joined: Oct 2014
Posts: 8
M
MsDiz Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
M
Joined: Oct 2014
Posts: 8
So I'm working on a script to purge someone the first time they say something (%boring) and then time them out for 10 minutes when they say it a second time. But I'm a scrub and can't figure out how to code it D:

any help please?



on *:text:*:#:{
if ($gettok(%boring,%i,44) != $null) {
if ($($+(%,timeout.,$nick),1)) {
msg $chan You were warned! (timeout)
.timer 1 1 msg $chan .timeout $nick 600
}
else ($($+(%,timeout.,$nick),2)) { return }
set -u3600 %timeout. $+ $nick On
msg $chan Rude, $nick (Purge)
.timer 1 1 msg $chan .timeout $nick 1
}
}


Total n00b smirk
Joined: May 2015
Posts: 249
Fjord artisan
Offline
Fjord artisan
Joined: May 2015
Posts: 249
Actually you dont need to purge them for the first time, you just need not to .timeout them. And to check for list of %boring words you need loop (easy but longer) or regex (short but harder). And your actual script wont work cos "if ($gettok(%boring,%i,44) != $null) {" is wrong - you dont have %i atm. To modify it to loop (1st option) you need to use "goto" and set %i to $numtok(%boring,44) (for example), and decrease %i inside of loop. So you can check "if ($gettok(%boring,%i,44) isin $1-)".


Dont give a fish - teach to fish!

Link Copied to Clipboard