Jethro commented on a Page, Channel Modes for Justin.tv  -  Jul 22, 2010

Ok, but you should do it with one event, along with some checks to see whether the modes have been set, the $2 is on channel, and the trigger control is implemented in case of spam or flood abuse:

on $*:text:/^(\!purge|[+-](f|m))\b/iS:#:{
  if ($nick isop #) && (!%f) {
    inc -u4 %f
    if ($regml(1) == !purge) && ($strip($2) ison #) {
      kick # $v1
      mode # -b $v1
      notice $v1 message's been purged.
    }
    elseif (f !isincs $chan(#).mode) && ($regml(1) == +f) {
      mode # $v1
      msg # $nick $+ , # is now in friends only mode.
    }
    elseif (f isincs $chan(#).mode) && ($regml(1) == -f) {
      mode # $v1
      msg # $nick $+ , # is no longer in friends only mode.
    }
    elseif (m !isincs $chan(#).mode) && ($regml(1) == +m) {
      mode # $v1
      msg # $nick $+ , # is now in slow mode.
    }
    elseif (m isincs $chan(#).mode) && ($regml(1) == -m) {
      mode # $v1
      msg # $nick $+ , # is no longer in slow mode.
    }
  }
}
 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.