All pastes #484286 Raw Edit

Someone

public text v1 · immutable
·published 2007-05-12 03:49 UTC
rendered paste body
on *:text:whois on:#:{
 if ($nick ishop $chan) || ($nick isop $chan) {
  set %whois [ $+ [ $chan ] ] enabled
  msg $chan Whois has been enabled for $chan
 }
}
on *:text:whois off:#:{
 if ($nick ishop $chan) || ($nick isop $chan) {
 unset %whois [ $+ [ $chan ] ]
 msg $chan whois option has been turned off for $chan
 }
}
on $*:TEXT:/^[!.]whois (on|off)/Si:#:{
  if (%whois [ $+ [ $chan ] ] == enabled) {
  if ($nick isop $chan) || ($nick ishop $chan) || ($nick == JimmyBobby2) {
    if ($2 == on) { set %check on | notice $nick I will message you the channels now. }
    elseif ($2 == off) { unset %check | notice $nick I will no longer message you the channels now. }
   }
 }
}
alias -l c1 { return $+(,$1-,) }
alias -l c2 { return $+(,$1-,) }
on *:JOIN:#:{
  if (%check == on) {
    whois $nick
    set %whois.nick $nick
    set %whois.dest $chan
  }
  else { halt }
}
raw 319:*:{
  if (!%whois.dest) { halt }
  var %chans $3-
  msg %whois.dest $+($c1(**[),$c2(Channels),$c1(]:)) $c2(%whois.nick) $c1(is on:) $c2(%chans)
  unset %whois.*
}