Jethro commented on a Page, auto unban script  -  Jan 27, 2011

Just a little experiment with the $mode(). This should work correctly to reverse the ban set upon the client running the code. Feel free to give me some pointers, jaytea:

on !@*:rawmode:#:{
  if ($mode(1).ban == $+($me,!*@*)) {
    mode # -b $v1
  }
  else {
    var %x = 1
    while ($mode(%x).ban) {
      var %v1 = $v1
      if ($istok($+($address($me,0),$chr(32),$&
        $regsubex($str(.,9),/./g,$&
        $+($chr(32),$address($me,\n)))),%v1,32)) {
        mode # -b %v1
      }
      inc %x
    }
  }
}
 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.