Kick & Ban Logger 1.0

By Andy on Jan 13, 2007

Copy and Paste in removes in a new seperate file.
I finally had the time to fix a few things and do a few tweaks.

Credit goes to RusselB and everyone else who had helped me with this snippet. :)

on *:kick:#:{ 
  if $nick isop $chan { 
    .write $+($shortfn($logdir),kicks_bans.log) $nick kicked $knick from $chan on $date at $time 
    window -n @KickAlert 
    echo @KickAlert $nick kicked $knick from $chan on $date at $time Reason: $1-
  } 
} 

on *:ban:#:{
  var %i = 1
  var %tot = $nick($chan,0)
  while (%i <= %tot) {
    if ($banmask iswm $address($nick($chan,%i),5)) {
      .write $+(",$logdir,kicks_bans.log,") $nick banned $nick($chan,%i) from $chan on $date at $time 
      window -n @BanAlert 
      echo @BanAlert $nick banned $nick($chan,%i) from $chan on $date at $time 
    }
    inc %i
  }
} 

Comments

Sign in to comment.
Andy   -  Jan 19, 2007

Caseidon I know.....I am working to fix the reported bugs and add a few more features...

 Respond  
chicknh8r   -  Jan 14, 2007

may also want to check if window even exist first by,

if (!$window(@KickAlert)) window -n @KickAlert
echo $colour(info) -t @KickAlert blablablabla

 Respond  
Caseidon   -  Jan 14, 2007

\'if $nick isop $chan {\'

Not only ops can kick/ban, Halfops aswell.

 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.