All pastes #79756 Raw Edit

Stuff

public text v1 · immutable
·published 2006-07-05 17:41 UTC
rendered paste body
;on notice script all the way down to the end of the whole script file

on *:NOTICE:*:*:{
  if ($nick != ChanServ) { halt }
  if (!%apply) { halt }
  if (%mode_ban) {
    msg #ShockServ 0,1 $+ %nick.ask $+ , I am currently banned from the channel 4(14 $+ %channel $+ 4)0,1. Please use !delban $me in your channel, and then reapply.
    unset %mode_ban
    unset %apply
    halt  
  }
  if (%mode_i) {
    msg #ShockServ 0,1 $+ %nick.ask $+ , The channel 4(14 $+ %channel $+ 4)0,1 is currently mode +i, to getabot you must do !mode -i in your channel, and then reapply.
    unset %mode_i
    unset %apply
    halt
  }
  if (%mode_k) {
    msg #ShockServ 0,1 $+ %nick.ask $+ , The channel 4(14 $+ %channel $+ 4)0,1 is currently mode +k, to getabot you must do !mode -k in your channel, and then reapply.
    unset %mode_k
    unset %apply
    halt  
  }
  if (%channel_full) {
    msg #ShockServ 0,1 $+ %nick.ask $+ , The channel 4(14 $+ %channel $+ 4)0,1 is currently full, to getabot you must do !mode -l in your channel, and then reapply.
    unset %channel_full
    unset %apply
    halt
  }
  if (*has not been registered* iswm $1-) {
    msg #ShockServ 0,1 $+ %nick.ask $+ , The channel 4(14 $+ %channel $+ 4)0,1 is currently not registered with ChanServ.
    part %channel
    unset %apply    
    halt
  }
  if (*lacks access* iswm $1-) {
    msg #ShockServ 0,1 $+ %nick.ask $+ , You currently not on the userlist in the channel 4(14 $+ %channel $+ 4)0,1.
    part %channel  
    unset %apply  
    halt
  }
  if (*must first authenticate* iswm $1-) {
    msg #ShockServ 0,1 $+ %nick.ask $+ , You must first authenticate with AuthServ before you can getabot!
    part %channel
    unset %apply
    halt
  }
  if (xeonnet !isin $address(%nick.ask,2)) {
    msg #ShockServ 0,1 $+ %nick.ask $+ , You must first do  $+ //mode $ $+ me +x $+  before you can getabot!
    unset %apply
    part %channel
    halt
  }
  var %i = 1
  while (%i <= $nick(%channel,0)) {
    if (*Boat* iswm $nick(%channel,%i)) {
      set %boat $nick(%channel,%i)
    }
    if (*Beta-* iswm $nick(%channel,%i)) {
      set %beta $nick(%channel,%i)
    }
    if (*ClanBot-* iswm $nick(%channel,%i)) {
      set %clanbot $nick(%channel,%i)
    }
    if (*Xbot|* iswm $nick(%channel,%i)) {
      set %xbot $nick(%channel,%i)
    }
    inc %i
  }
  if (%boat) {
    msg #ShockServ 0,1 $+ %nick.ask $+ , Sorry but there is currently another type of bot in your channel 4(14 $+ %channel $+ 4)0,1  $+ %boat $+ . You cannot have a ShockServ until that bot is removed.
    unset %apply    
    unset %boat
    part %channel
    halt
  }
  if (%beta) {
    msg #ShockServ 0,1 $+ %nick.ask $+ , Sorry but there is currently another type of bot in your channel 4(14 $+ %channel $+ 4)0,1  $+ %beta $+ . You cannot have a ShockServ until that bot is removed.
    unset %apply    
    unset %beta
    part %channel
    halt
  }
  if (%clanbot) {
    msg #ShockServ 0,1 $+ %nick.ask $+ , Sorry but there is currently another type of bot in your channel 4(14 $+ %channel $+ 4)0,1  $+ %clanbot $+ . You cannot have a ShockServ until that bot is removed.
    unset %apply    
    part %channel
    unset %clanbot
    halt
  }
  if (%xbot) {
    msg #ShockServ 0,1 $+ %nick.ask $+ , Sorry but there is currently another type of bot in your channel 4(14 $+ %channel $+ 4)0,1  $+ %xbot $+ . You cannot have a ShockServ until that bot is removed.    
    unset %apply    
    unset %xbot
    part %channel
    halt
  }
  if (*has access* iswm $1-) {
    if ($strip($5,b) <= 400) {
      msg #ShockServ 0,1 $+ %nick.ask $+ , You currently have access  $+ $strip($5,b) $+ , we require at least 401 access in 4(14 $+ %channel $+ 4)0,1 to getabot.
      part %channel      
      unset %apply
      halt
    }
    else {
      idlecheck
    }
  }
}

alias idlecheck {
  if ($nick(%channel,0) >= 7) {
    part %channel
    unset %apply
    $eval($botapply)
  }
  elseif ($nick(%channel,0) < 7) {
    msg #shockserv 0,1 $+ %nick.ask $+ , Your channel 4(14 $+ %channel $+ 4)0,1 currently has $calc($nick(%channel,0) - 2) Idlers. We require you to have 5 or more idlers NOT Including ChanServ or Myself. Once you have enough idlers, you may reapply.
    part %channel      
    unset %apply
    halt
  }
}


on Admin:TEXT:@rehash:#: {
  ;NOTE: Inorder for this script to work this script must be the last script!
  notice $nick Rehashing.....  
  notice $nick Rehashed $script(0) scripts.  
  var %i = 1
  while (%i <= $script(0)) {
    reload -rs " $+ $script(%i) $+ "
    inc %i
  }
}
on *:TEXT:@lines:#: {
  msg $chan 0,1There are  $+ $totallines $+  total lines in all of my scripts combined!
}