Ignore with a timer

By Scakk on Apr 18, 2007

This is one you would put in your Aliases. It is an Ignore with a timer for it. The time is in seconds or minutes depending on which one you use.

Example:

/ignore WaiterJohn 30

  • Added WaiterJohn!@ to ignore list
  • Added WaiterJohn!@ to ignore list for 30 seconds
  • Timer 1 activated
  • Removed WaiterJohn!@ from ignore list
  • Timer 1 halted

/ignore WaiterJohn 1

  • Added WaiterJohn!@ to ignore list
  • Added WaiterJohn!@ to ignore list for 1 minutes
  • Timer 1 activated
  • Removed WaiterJohn!@ from ignore list
  • Timer 1 halted
;;;Seconds;;;

;Command trigger /ignore  nick time (in seconds)
ignore {
  var %n $$1
  /ignore $$1 
  echo * Added $$1!*@* to ignore list for $$2 seconds
  silence + $+ $$1
  timer 1 $$2 /ignoretimer $$1 $$2 %n
}
ignoretimer { silence + $+ $$1 | echo * Removed $$1!*@* from ignore list }

-----------------

;;;Minutes;;;

;Command trigger /ignore  nick time (in seconds)
ignore {
  var %n $$1
  /ignore $$1 
  echo * Added $$1!*@* to ignore list for $$2 minutes
  silence + $+ $$1
  timer 1 $calc($$2 * 60) /ignoretimer $$1 $calc($$2 * 60) %n
}
ignoretimer { silence + $+ $$1 | echo * Removed $$1!*@* from ignore list }

Comments

Sign in to comment.
Kentaro Kurosaki   -  Apr 18, 2012

Also note, not all ircd's have

/silence
 Respond  
Pangaea   -  Mar 30, 2012

hi Sultani.... i ran that code you posted, but it dosent seem to be working at all
Im trying to have the bot ingore ppl if they flood chan.
I tried to flood the chan, but the bot never ignored me
(yes i made sure i was un-oped when trying to flood)

i cant seem to find anything else like this here on hawkee or anywhere online

 Respond  
Kentaro Kurosaki   -  Oct 21, 2011

Would there be a way to make it deal with command spam, like for a bot, so it doesn't get kicked or abused?

 Respond  
Sultani   -  May 25, 2008

i was looking for something like this, i saw an anti flood made by zainul, and then i made this for my needs:
on 1:TEXT:*:?:{
if ($nick == $me) {
halt
}
if ($nick isop $chan) {
halt
}
inc -u5 %flood. [ $+ [ $nick ] ]
if (%flood. [ $+ [ $nick ] ] == 6) {
/ignore -u40 $nick
halt
}
}

it will block the user that flood (include querys) for the time i set..

I just follow the xDaeMoN advice and voila..

 Respond  
guest598594   -  Sep 05, 2007

you can do

ignore -u $+ $calc($2 * 60) $1

 Respond  
Blue   -  Apr 20, 2007

nice, a little rough around the edges, but nice.

 Respond  
Scakk   -  Apr 19, 2007

Notice that the original did not work. I fixed it to work. I also added the requested echo line. I also added on that will do minutes.

 Respond  
BackoffJackson   -  Apr 19, 2007

Why don\'t you use $calc($$2*60)? It could then be in minutes, as well as adding a feature to echo back the amount of time you ignored them for, just in case you typo\'d.

 Respond  
|MELIORITE|   -  Apr 19, 2007

Yeah, as above, agreed. Nonetheless, a nice idea... I can now use either one to stop me from putting people on ignore for 3+ months. I think the code is sharp in the sense it is written economically and functionally.

 Respond  
xDaeMoN   -  Apr 18, 2007

mIRC\'s /ignore also has a built-in unset switch which is \"-uN\", N being the number of seconds before you remove the ignore.

/help /ignore

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.