$iggy and $uggy AutoReply AntiFlood

By gooshie on Oct 12, 2009

$iggy and $uggy offer protection against malicious and unintentional repeated triggering of auto-reply events to prevent exceeding channel or server flood limits. Both methods allow up to three different nicks to receive one reply each before limits are imposed and store data in a hash table to avoid hard drive activity. Of the two methods $iggy is more forgiving in that it will reset every nine seconds regardless of number of triggers whereas $uggy will only reset nine seconds AFTER the last triggering event. It is required that a $iggy($nick) type condition check be added to all channel auto-responses as illustrated in the included examples.

on *:TEXT:*match text*:#:if (!$iggy($nick)) msg # reply text
on *:ACTION:*match text*:#:if (!$iggy($nick)) describe # reply text
on *:NOTICE:*match text*:#:if (!$iggy($nick)) notice # reply text

alias iggy {
  var %g,%cid $hget(iggy,$cid)
  if $hget(iggy,$1) || (%cid > 3) { %g = 1 }
  if !$v1 { hinc -mu9 iggy $1 }
  if !%cid || (%cid < 4) { hinc -mu9 iggy $cid }
  return %g
}

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Below is $uggy which is less forgiving ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

on *:TEXT:*match text*:#:if (!$uggy($nick)) msg # reply text
on *:ACTION:*match text*:#:if (!$uggy($nick)) describe # reply text
on *:NOTICE:*match text*:#:if (!$uggy($nick)) notice # reply text

alias uggy {
  var %g
  if ($hget(uggy,$1)) || ($hget(uggy,$cid) > 3) { %g = 1 }
  hinc -mu9 uggy $1
  hinc -mu9 uggy $cid
  return %g
}

Comments

Sign in to comment.
gooshie   -  Jan 23, 2011

$iggy and $uggy offer protection against malicious and unintentional repeated triggering of auto-reply events to prevent exceeding channel or server flood limits. Both methods allow up to three different nicks to receive one reply each before limits are imposed and store data in a hash table to avoid hard drive activity. Of the two methods $iggy is more forgiving in that it will reset every nine seconds regardless of number of triggers whereas $uggy will only reset nine seconds AFTER the last triggering event. It is required that a $iggy($nick) type condition check be added to all channel auto-responses as illustrated in the included examples.

 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.