All pastes #284309 Raw Edit

!global command

public text v1 · immutable
#284309 ·published 2006-12-19 00:35 UTC
rendered paste body
on *:TEXT:!ah-on*:#: {
  if ( $nick(#,$nick,vr) ) {
    notice $nick You must be at least halfop to do this
  }
  else {
    set %ahchannel $addtok(%ahchannel,$chan,44)
    set %ahop $addtok(%ahop,$chan,44)
    msg $chan 4auto halfop is now on for $chan
  }
}
on *:TEXT:!ah-off*:#: {
  if ( $nick(#,$nick,vr) ) {
    notice $nick You must be at least halfop to do this
  }
  else {
    set %ahchannel $remtok(%ahchannel,$chan,44)
    set %ahop $remtok(%ahop,$chan,44)
    msg $chan 4auto halfop is now off for $chan
  }
}
on *:JOIN:%ahchannel:{ 
  if (%ahop) { 
    .timer 1 1 /notice $nick Welcome $nick 
    .timer 1 1 /notice $nick checking status.. 
    .timer 1 1 checkhops $nick $chan 
    .timer 1 1 statuscheck $nick $chan
  } 
} 
alias statuscheck { 
  if ($1 isreg $2) { 
    notice $1 Auto Halfoping Now... 
    mode $2 +h $1 
  }
}
alias checkhops {
  if ($1 isop $2) || ($1 ishop $2) {
    notice $1 Halfoping canceled...
  }
}