Channel Protector, EASY!

By log2 on Apr 03, 2005

a VERY simple channel protector, if you find anything wrong or anything I should add to it please post it below in the comment section :D By the way you really have to do nothing to set it up... just change the only #log2 to the channel you want it to work in then click yes when you load it :D easy!

; VERY IMPORTANT!
; BEFORE LOADING, CHANGE #LOG2 TO THE CHANNEL OF YOUR CHOICE THEN WHEN YOU LOAD, CLICK YES!
on *:LOAD: {
  set %ch $$?="Channel Name?"
  echo -a Channel set as %ch
}
on *:KICK:%ch: {
  if ($knick == $me) {
    rejoin
  }
  mode $chan -o $nick
}
on *:BAN:%ch: {
  if ($nick == $me) {
    halt
  }
  else {
    if (%i == $null) {
      set %i 1
    }
    else {
      inc %i
    }
    mode $chan -b $banmask
    set %o $+ $nick 1
    .notice $nick You're not allowed to be op for 30 minutes
    timer $+ %i 1 1800 unset %o $+ $nick
    inc %i
    timer $+ %i 1 1800 .notice $nick You can be op again!
    mode $chan -o $nick
  }
}
on *:OP:%ch: {
  if (%i == $null) {
    set %i 1
  }
  else {
    inc %i
  }
  if ($nick == $me) {
    halt
  }
  if (%o $+ $opnick) {
    mode $chan -o $opnick
    mode $chan -o $nick
    set %o $+ $nick 1
    .notice $nick You're not allowed to be op for 15 minutes
    timer $+ %i 1 900 unset %o $+ $nick
    inc %i
    timer $+ %i 1 900 .notice $nick You can be op again!
  }
}
alias rejoin {
  if ($nick ison $chan) {
    part $chan
  }
  /timer 1 1 /join $chan
}
on *:mode:%ch:{
  mode $chan +nt-milksp
}

Comments

Sign in to comment.
mom4ooo   -  Nov 12, 2006

how i can download..

More
 Respond  
Hawkee   -  May 29, 2005

xDaeMoN, I\'ve removed the 0 score.

More
 Respond  
log2   -  Apr 03, 2005

hmmm I didn\'t even think of that... a lot easier... thanks DarthReven

More
 Respond  
DarthReven   -  Apr 03, 2005

in the on load use $$?=\"Channel Name?\"

More
 Respond  
supergeo   -  Apr 03, 2005

There ya go I rated a \'10\' to help bring it back up.

More
 Respond  
xDaeMoN   -  Apr 03, 2005

\"isin\" and Ison\" are two different operators.

More
 Respond  
xDaeMoN   -  Apr 03, 2005

Oh man, didn\'t mean to score 0 on this one. Accidentally hit the \"rate it\" button. Hawkee, can you please undo it. Thanks.

More
 Respond  
log2   -  Apr 03, 2005

but it works like it was... but it was changed anyway

More
 Respond  
xDaeMoN   -  Apr 03, 2005

2 things I noticed on your snippet, \"$nick isin $chan\" should be \"$nick ison $chan\" and \"ban -r $chan $banmask 0\" should be \"mode $chan -b $banmask\".

More
 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.