Ban Notification

By Serpentsounds on Nov 28, 2009

When a user places a ban or bans on a channel, if any of the bans affect any of the users currently on a channel, this script will change the echoed text to display such. Also works for quiet bans, nick change bans, excepts, and invites.

I know the whole /who part doesn't do a ton of good because processing is faster than the server's response, but it should at least update your IAL for future occurrences. There is always the option of delaying the entire mode text by a couple seconds, but for now this is what I use.

on ^*:RAWMODE:#:{
  var %b = $countcs($1,b,e,I),%y = 1
  if (%b) {
    while (%y <= %b) {
      var %x = 1
      while (%x <= $nick($chan,0)) {
        if (!$address($nick($chan,%x),5)) {
          if ($group(#whoing).status == off) .enable #whoing
          who $nick($chan,%x)
        }
        if ($remove($wildtok($2-,*!*@*,%y,32),~q:,~n:) iswm $address($nick($chan,%x),5)) var %bl = $addtok(%bl,$nick($chan,%x),32)
        inc %x
      }
      inc %y
    }
    if (%bl) {
      echo $color(mode) -t $chan $+($chr(42),$chr(32),$nick,$chr(32),sets mode,$chr(58),$chr(32),$1-,$chr(32),$str($chr(58),2),$chr(32),$chr(2)) $+ $iif(%b > 1,These affect,This affects) $+ : %bl
      haltdef
    }
    if ($group(#whoing).status == on) .timer 1 2 .disable #whoing
  }
}
#whoing off
raw 352:*:haltdef
raw 315:*:haltdef
#whoing end

Comments

Sign in to comment.
Serpentsounds   -  Nov 28, 2009

The rawmode event just checks each mode settings for b, e, and I being set, and sees if they affect anyone. I'll give you some examples of the changes it makes. Instead of normal bans, you'll see:

  • Benjamin sets mode: +b ~q:!heverybes@network.admin :: This affects: Benjamin

  • Benjamin sets mode: +e !@* :: This affects: Benjamin MEGASSBOT UltraServ

  • Benjamin sets mode: +II !heverybes@network.admin !MEGASSBOT@services.admin :: These affect: Benjamin MEGASSBOT

All text after the :: is in bold.

 Respond  
Master-Of-Death   -  Nov 28, 2009

i'm confused :S i don't understand raw modes....

 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.