All pastes #251401 Raw Edit

Something

public text v1 · immutable
#251401 ·published 2006-11-18 02:54 UTC
rendered paste body
alias isreg {
  set %regcheck on
  ns info $1
  while (!%reg) {
    .comopen f wscript.shell 
    if (!$comerr) {
      .comclose f $com(f,run,1,bstr,% $+ comspec% /c,i2,,bool,) 
    }
  }
  if (%reg == yes) { 
    unset %reg 
    return $true 
  }
  else { 
    unset %reg
    return $false
  }
}

on *:notice:* is *:?:{
  if ((%regcheck == on) && ($nick == NickServ)) {
    unset %regcheck
    set %reg yes
  }
}

on *:notice:Nick * isn't registered.:?:{
  if ((%regcheck == on) && ($nick == NickServ)) {
    unset %regcheck
    set %reg no
  }
}

alias isid {
  set %idcheck on
  .whois $1
  while (!%id) {
    .comopen f wscript.shell 
    if (!$comerr) {
      .comclose f $com(f,run,1,bstr,% $+ comspec% /c,i2,,bool,) 
    }
  }
  if (%id == yes) {
    unset %id
    return $true
  }
  else {
    unset %id
    return $false
  }
}

menu nicklist {
  ID Check:{
    if ($isid($1)) { 
      echo 3 -a $1 is identified.
    }
    else {
      echo 4 -a $1 is not identified.
    }
  }
}

raw 307:*:{
  if (%idcheck == on) {
    set %id yes
    unset %idcheck
  }
}

raw 318:*:{
  if (%idcheck == on) { 
    set %id no
    unset %idcheck
  }
}

alias kb {
  if (($me !isop $active) && ($me !ishop $active)) {
    echo 4 -a You are not an operator on $+($active,.)
  } 
  elseif (!$1) { 
    echo 4 -a No nick entered.
  }
  elseif ($1 !ison $active) {
    echo 4 -a The nick $qt($1) is not on $+($active,.)
  }
  elseif ($isoper($1)) {
    echo 4 -a I'd reconsider banning an IRC Operator.
  } 
  else {
    if ($address($1,2) == *!*@127.0.0.1) {
      if ($isid($1)) { 
        echo 4 -a I'd reconsider banning an IRC Operator.
        halt
      }
    }
    if (!$2) {
      ban -k $1 2 Spam.
    }
    else {
      ban -k $1 2 $2-
    }
  }
}

alias isoper {
  set %opercheck on
  who $1    
  while (!%oper) {
    .comopen f wscript.shell 
    if (!$comerr) {
      .comclose f $com(f,run,1,bstr,% $+ comspec% /c,i2,,bool,) 
    }
  }
  if (%oper == yes) {
    unset %oper 
    unset %opercheck  
    return $true
  }
  else { 
    unset %oper
    unset %opercheck
    return $false
  }
}

raw 352:*:{ 
  if (%opercheck == on) { 
    set %oper $iif(* isin $7,yes,no) 
  } 
}

alias tkb {
  if (($me !isop $active) && ($me !ishop $active)) {
    echo 4 -a You are not an operator on $+($active,.)
  } 
  if (!$1) { 
    echo 4 -a No nick entered.
  }
  elseif ($1 !ison $active) {
    echo 4 -a The nick $qt($1) is not on $+($active,.)
  }
  elseif ($isoper($1)) {
    echo 4 -a I'd reconsider banning an IRC Operator.
  } 
  else {
    if ($address($1,2) == *!*@127.0.0.1) {
      if ($isid($1)) { 
        echo 4 -a I'd reconsider banning an IRC Operator.
        halt
      }
    }
    ban -ku $+ $calc(($readini(Tkb.ini,n,$+($network,.,$active),$1)+1)*600) $1 2 $2- ( $+ $calc(($readini(Tkb.ini,n,$+($network,.,$active),$1)+1)*10) minute ban $+ ) 
    writeini -n Tkb.ini $+($network,.,$active) $1 $calc($readini(Tkb.ini,n,$+($network,.,$active),$1)+1)  
  }
}