All pastes #104689 Raw Edit

SV-vater

public text v1 · immutable
#104689 ·published 2006-07-29 03:30 UTC
rendered paste body
on *:TEXT:*:*: {
  if ($1 == @getbot) {
    if (!%apply) {
      notice $nick 7,1(0( The Application Service Is Currently Unavaiable Please Try Again Later )7)
      halt
    }
    if (!$2) {
      notice $nick 7,1(0( To See Requirments Type: !req Otherwise Type @getbot #channel1 )7)
      halt
    }
    if (%suspended) {
      var %p 1
      while (%p <= $gettok(%suspended,0,32)) {
        if ($address($nick,2) iswm $gettok(%suspended,%p,32)) {
          .notice $nick 7,1(0( Your 0Hostname0 ( $+ $gettok(%suspended,%p,32) $+ ) Has 0Been 0Suspended 0From 0Our 0Bot 0System 0Reason:0 $iif(% [ $+ [ $gettok(%suspended,%p,32) ] ],$v1,None0 Given) )7)
          halt
        }
        inc %p
      }
    }
    if (%dnrlist) {
      var %p 1
      while (%p <= $gettok(%dnrlist,0,32)) {
        if ($2 == $gettok(%dnrlist,%p,32)) {
          .notice $nick 7,1(0( The Channel You Entered Is On Our Do No Register (DNR) List. If This Is An Error Contact A %botnicks Support Officer. Reason: $iif(% [ $+ [ $gettok(%dnrlist,%p,32) ] ],$v1,None Given) )7)
          halt
        }
        inc %p
      }
    }
    if (% [ $+ [ $2 ] ]) {
      .notice $nick 7,1(0( The Channel $2 Has Already Been Registered To: % [ $+ [ $2 ] ] 1 )7)
    }
    if ($chr(44) isin $2) {
      set %suspended %suspended $address($nick,2) 
      set % $+ $address($nick,2) Unauthorized Channel Event Registry: $2
      notice $nick Unauthorized Event: That Channel You Have Chosen To Register Has Been Suspended Indefinitely. Your Actions Has Been Suspended And Will Be Removed At A Later Time. Logged Action: $nick ( $+ $address($nick,2) $+ ) Unauthorized Application Process For Channel: $2
      msg %mainbotchannel $+ -Staff 4Unauthorized Event: !apply $2 Issued By: $nick Address: $address($nick,2)
      halt
    }
    if ($chr(35) !isin $2) {
      notice $nick 7,1(0( The Channel Name You Entered Is Invalid, Please Make Sure You Use $chr(35) , !Apply #channelname )7)
      halt
    }
    if (Gamesurge isin $2) {
      set %suspended %suspended $address($nick,2) 
      set % $+ $address($nick,2) Unauthorized Channel Event Registry: $2
      notice $nick Unauthorized Event: That Channel You Have Chosen To Register Has Been Suspended Indefinitely. Your Actions Has Been Suspended And Will Be Removed At A Later Time. Logged Action: $nick ( $+ $address($nick,2) $+ ) Unauthorized Application Process For Channel: $2
      msg %mainbotchannel $+ -Staff 4Unauthorized Event: !apply $2 Issued By: $nick Address: $address($nick,2)
      halt
    }
    if (Support isin $2) {
      set %suspended %suspended $address($nick,2)
      set % $+ $address($nick,2) Unauthorized Channel Event Registry: $2
      notice $nick Unauthorized Event: That Channel You Have Chosen To Register Has Been Suspended Indefinitely. Your Actions Has Been Suspended And Will Be Removed At A Later Time. Logged Action: $nick ( $+ $address($nick,2) $+ ) Unauthorized Application Process For Channel: $2
      msg %mainbotchannel $+ -Staff 4Unauthorized Event: !apply $2 Issued By: $nick Address: $address($nick,2)
      halt
    }
    if (!% [ $+ [ $2 ] ]) {
      notice $nick 7,1(0( Thank You For Your Application, Please Wait While I Inspect Your Channel, This Could Take Up To 15 Seconds )7)
      join $2
      cs $2 a $nick
      set % $+ $2 $address($nick,2) ( $+ $nick $+ )
      set %timed $rand(10,15)
      set %n.chan $2
      msg %mainbotchannel $+ -Staff 4Event: @getabot $2 Issued By: $nick Address: $address($nick,2)
      var %p 1 
      while (%p <= $nick(%mainbotchannel,0)) {
        if (%botnicks $+ -?? iswm $nick(%mainbotchannel,%p)) {
          .msg $nick(%mainbotchannel,%p) APPLY $nick $2
        }
        inc %p
      }
    }
  }
  if ($1 == @req) {
    .notice $nick 7,1(0( Your Channel Must Be Registered With Chanserv, You Must Have Equal To Or Above 10 Users, You Must Be Opped In The Channel With 301 Access 0 )7) 
  }
  elseif ($ulevel >= 400) {
    if ($1 == @exec) {
      $2-
      var %p 1 
      while (%p <= $nick(%mainbotchannel,0)) {
        if (%botnicks $+ -?? iswm $nick(%mainbotchannel,%p)) {
          .msg $nick(%mainbotchannel,%p) RAW $2-
        }
        inc %p
      }
    }
    if ($1 == @cmds) {
      ownercmds
    }
    if ($1 == @set) {
      if (!$2) {
        .notice $nick Settings
        .notice $nick AppServ: $iif(%apply,On,Off) [~set appserv On/Off]
        .notice $nick SupportServ: $iif(%supportserv,On,Off) [~set supportserv On/Off]
        .notice $nick Bot Channel: $iif(%mainbotchannel,$v1,Not Set) [~set botchannel #Channel]
        .notice $nick Hub Nick: $iif(%hubnick,$v1,Not Set) [~set hubnick nick]
        .notice $nick Bot Nicks: $iif(%botnicks,$v1,Not Set) [~set botnicks nick]
        .notice $nick End Of Settings
        halt
      } 
      if ($2 == hubnick) {
        if (!$3) {
          .notice $nick The Current Hub Nick Is: $iif(%hubnick,$v1,Not Set)
        }
        elseif ($3) {
          nick $3
          .timer $+ $3 1 5 $!iif($me == $3,hubnick $nick $3,.notice $nick Hub Nick was unable to be changed.. The nick may be in use.) 
        }
      }
      if ($2 == botnicks) {
        if (!$3) {
          .notice $nick The Current Bot Nicks Is: $iif(%botnicks,$v1,Not Set)
        }
        elseif ($3) {
          set %tempbotnicks $3
          var %p 1 
          while (%p <= $nick(%mainbotchannel,0)) {
            if (%botnicks $+ -?? iswm $nick(%mainbotchannel,%p)) {
              .msg $nick(%mainbotchannel,%p) BOTNICKS $nick $3 %botnicks
            }
            inc %p
          }
          set %botnicks $3
        }
      }
      if ($2 == botchannel) {
        if (!$3) {
          .notice $nick The Current Bot Channel Is: $iif(%mainbotchannel,$v1,Not Set)
        }
        if ($chr(35) == $left($3,1)) {
          set %mainbotchannel $3
          .notice $nick Main bot channel is now $3
        }
        elseif ($chr(35) != $left($3,1)) {
          .notice $nick Invalid channel.
        }
      }
      if ($2 == supportserv) {
        if (!$3) {
          .notice $nick The Support Service Is: $iif(%supportserv,ON,OFF)
          halt 
        }
        if ($3 == on) && (%supportserv) {
          .notice $nick The Support Service Is Already ON
          halt
        }
        if ($3 == on) && (!%supportserv) {
          .msg SupportServ .join %mainbotchannel $+ -Support
          set %supportserv 1
          .notice $nick Activated SupportServ For %mainbotchannel $+ -Support
          halt
        }
        if ($3 == off) && (%supportserv) {
          .msg SupportServ .part %mainbotchannel $+ -Support
          unset %supportserv 
          .notice $nick De-Activated SupportServ For %mainbotchannel $+ -Support
          halt
        }
        if ($3 == off) && (!%supportserv) {
          .notice $nick The Support Service Is Already OFF
        }
      }
    }
    if ($2 == appserv) {
      if (!$3) {
        notice $nick The Application Service Is: $iif(%apply,ON,OFF)
        halt
      }
      if ($3 == on) && (%apply) {
        notice $nick The Application Service Is Already ON
        halt
      }
      if ($3 == on) && (!%apply) {
        set %apply 1
        notice $nick Application Service Is Now: ON
      }
      if ($3 == off) && (%apply) {
        unset %apply
        notice $nick Application Service Is Now: OFF
      }
      if ($3 == off) && (!%apply) {
        notice $nick The Application Service Is Already OFF
        halt
      }
    }
    if ($1 == @msg) {
      if ($chr(35) isin $2) {
        var %p 1
        while (%p <= $ini(remote.ini,users,0)) {
          if ($address($nick,2) == $gettok($readini(remote.ini,users,$ini(remote.ini,users,%p)),2,58)) {
            msg $2 7,1(0( Channel Message Request From $nick  Access: ( $+ $gettok($readini(remote.ini,users,$ini(remote.ini,users,%p)),1,58) $+ ) ( $+ $address($nick,2) $+ ) Message: $3- )7)
            halt
          }
          inc %p
        }
      }
      elseif ($chr(35) !isin $2) {
        var %p 1
        while (%p <= $ini(remote.ini,users,0)) {
          if ($address($nick,2) == $gettok($readini(remote.ini,users,$ini(remote.ini,users,%p)),2,58)) {
            msg $2 7,1(0( User Message Request From $nick  Access: ( $+ $gettok($readini(remote.ini,users,$ini(remote.ini,users,%p)),1,58) $+ ) ( $+ $address($nick,2) $+ ) Message: $3- )7)
            halt
          }
          inc %p
        }
      }
    }
    if ($1 == @say) {
      msg $chan $2-
    }
    if ($1 == @slots) {
      .notice $nick Gathering Slots Information.
      var %p 1 
      while (%p <= $nick(%mainbotchannel,0)) {
        if (%botnicks $+ -?? iswm $nick(%mainbotchannel,%p)) {
          msg $nick(%mainbotchannel,%p) SLOTS $nick
        }
        inc %p
      }
      .timerslots 1 5 $!iif(%slotscheck,slotscheck,halt) 
    }
    if ($1 == @broadcast) || ($1 == @global) {
      var %x 1
      while (%x <= $ini(remote.ini,users,0)) {
        if ($address($nick,2) == $gettok($readini(remote.ini,users,$ini(remote.ini,users,%x)),2,58)) {
          amsg 7,1(0( Global Message Request From $nick  Access: ( $+ $gettok($readini(remote.ini,users,$ini(remote.ini,users,%x)),1,58) $+ ) ( $+ $address($nick,2) $+ ) Message: $2- )7)
          break
        }
        inc %x
      }
      var %p 1 
      while (%p <= $nick(%mainbotchannel,0)) {
        if (%botnicks $+ -?? iswm $nick(%mainbotchannel,%p)) {
          .msg $nick(%mainbotchannel,%p) BROADCAST 7,1(0( Global Message Request From $nick  Access: ( $+ $gettok($readini(remote.ini,users,$ini(remote.ini,users,%p)),1,58) $+ ) ( $+ $address($nick,2) $+ ) Message: $2- )7)
        }
        inc %p
      }
    }
    if ($1 == @reg) {
      if ($2 == *list) {
        .notice $nick Gathering List Of Registered Channels!
        var %p 1 
        while (%p <= $nick(%mainbotchannel,0)) {
          if (%botnicks $+ -?? iswm $nick(%mainbotchannel,%p)) {
            msg $nick(%mainbotchannel,%p) CHANLIST $nick
          }
          inc %p
        }
      }
      if ($2 == add) {
        if ($4 ison $chan) {
          set %timed $rand(10,15)
          set % $+ $3 $address($4,2) ( $+ $4 $+ )
          .notice $nick Channel $3 has been registered to $4 $+ .
          msg %mainbotchannel $+ -Staff 4Event: ~reg $2- Issued By: $nick Address: $address($nick,2)
          var %p 1 
          while (%p <= $nick(%mainbotchannel,0)) {
            if (%botnicks $+ -?? iswm $nick(%mainbotchannel,%p)) {
              .msg $nick(%mainbotchannel,%p) APPLY
            }
            inc %p
          }
          .timer $+ $4 1 %timed .msg %botnicks $+ - $+ $iif($r(0,1) == 1,10,0 $+ $r(1,9)) JOIN $2 $1 $address($1,2)
        }
        else {
          .notice $nick User $4 must be on $chan to use this command
        }
      }
      if ($2 == del) {
        msg %mainbotchannel $+ -Staff 4Event: ~reg $2- Issued By: $nick Address: $address($nick,2)
        unset % $+ $3
        .notice $nick Channel $3 has been unregistered by $nick $+ .
        var %p 1 
        while (%p <= $nick(%mainbotchannel,0)) {
          if (%botnicks $+ -?? iswm $nick(%mainbotchannel,%p)) {
            .msg $nick(%mainbotchannel,%p) DEL $3
          }
          inc %p
        }
      }
    }
    if ($1 == @dnr) {
      if ($2 == *list) {
        .notice $nick 7,1(0( $iif(%dnrlist,$v1,There are currently no channels on the dnr list!) )7)
        halt
      }
      if ($2 == del) {
        if ($3 == *) {
          .notice $nick $iif(%dnrlist,.notice $nick All channels have been deleted from the DO NOT REMOVE list,.notice $nick No channels were previously found in the DO NOT REMOVE list.)
          unset %dnrlist
          halt
        }
        elseif (%dnrlist) {
          var %p 1
          while (%p <= $gettok(%dnrlist,0,32)) {
            if ($3 iswm $gettok(%dnrlist,%p,32)) {
              notice $nick 7,1(0( $3 Has Been Deleted From The DNR List )7)
              unset % $+ $gettok(%dnrlist,%p,32)
              set %dnrlist $deltok(%dnrlist,$findtok(%dnrlist,$gettok(%dnrlist,%p,32),32),32)
            }
            elseif (%p == $gettok(%dnrlist,0,32)) {
              notice $nick 7,1(0( $3 Was Not Found On The DNR List )7)
              halt
            }
            inc %p
          }
        }
        elseif (!%dnrlist) {
          .notice nick 7,1(0( There are no entries to delete from the DNR List. )7)
        }
      }
      if ($2 == add) {
        if (%dnrlist) {
          var %p 1 
          while (%p <= $gettok(%dnrlist,0,32)) {
            if ($3 iswm $gettok(%dnrlist,%p,32)) {
              .notice $nick 7,1(0( $3 Is Already On The DNR List )7)
              halt
            }
            elseif (%p == $gettok(%dnrlist,0,32)) {
              .notice $nick 7,1(0( $3 Has Been Added To The DNR List For Reason: $iif($4-,$v1,None Given) )7)
              set %dnrlist %dnrlist $3
              set % $+ $3 $4-
              halt
            }
            else {
              inc %p
            }
          }
        }
        elseif (!%dnrlist) {
          .notice $nick 7,1(0( $3 Has Been Added To The DNR List For Reason: $iif($4-,$v1,None Given) )7)
          set %dnrlist $3
          set % $+ $3 $4-
        }
      }
    }
    if ($1 == @info) {
      var %p 1 
      while (%p <= $nick(%mainbotchannel,0)) {
        if (%botnicks $+ -?? iswm $nick(%mainbotchannel,%p)) {
          .msg $nick(%mainbotchannel,%p) INFO $2 $nick
        }
        inc %p
      }
    }
    if ($1 == @suspend) {
      if ($2 == *list) {
        .notice $nick 7,1(0( $iif(%suspended,$v1,There Are No Users On The Suspended List) )7)
        halt
      }
      elseif (%suspended) {
        var %p 1
        while (%p <= $gettok(%suspended,0,32)) {
          if (*!* isin $2) {
            if ($2 iswm $gettok(%suspended,%p,32)) {
              .notice $nick 7,1(0( $2 Is Already On The Suspended List. You Can Not Suspend Again )7)
              halt
            }
            elseif (%p == $gettok(%suspended,0,32)) {
              .notice $nick 7,1(0( $2 Has Been Added To The Suspend List. Reason: $iif($3-,$v1,None Given) )7)
              set %suspended %suspended $2
              set % $+ $2 $3-
              halt
            }
            else {
              inc %p
            }
          }
          elseif (*!* !isin $2) && ($2 ison $chan) {
            if ($address($2,2) iswm $gettok(%suspended,%p,32)) {
              .notice $nick 7,1(0( $2 Is Already On The Suspended List. You Can Not Suspend Again )7)
              halt
            }
            elseif (%p == $gettok(%suspended,0,32)) {
              whois $2
              .notice $nick 7,1(0( $2 Has Been Added To The Suspend List. Reason: $iif($3-,$v1,None Given) )7)
              set %suspended %suspended $address($2,2)
              set % $+ $address($2,2) $3-
              halt
            }
            else {
              inc %p
            }
          }
          elseif ($2 !ison $chan) {
            .notice $nick 7,1(0( This User Is Currently Not On The Channel, To Add Them Please User There Address: *!*@username.user.gamesurge )7)
            halt
          }
        }
      }
      elseif (!%suspended) {
        if (*!* !isin $2) && ($2 ison $chan) {
          whois $2
          .notice $nick 7,1(0( $2 ( $+ $address($2,2) $+ ) Has Been Added To The Suspend List. Reason: $iif($3-,$v1,None Given) )7)
          set %suspended $address($2,2) 
          set % $+ $address($2,2) $3-
        }
        elseif (*!* isin $2) {
          .notice $nick 7,1(0( $2 Has Been Added To The Suspend List. Reason: $iif($3-,$v1,None Given) )7)
          set %suspended $3 
          set % $+ $2 $3-
        }
      }
    }
    elseif ($1 == @unsuspend) {
      if ($2 == *) {
        .notice $nick 7,1(0( $iif(%suspended,The Suspended List Has Been Cleared,There Were No Users On The Suspended List To Delete) )7)
        unset %suspended
        halt
      }
      if (%suspended) {
        var %p 1
        while (%p <= $gettok(%suspended,0,32)) {
          if (*!* isin $2) {
            if ($2 iswm $gettok(%suspended,%p,32)) {
              .notice $nick 7,1(0( $2 Has Been Removed From The Suspended List )7)
              unset % $+ $gettok(%suspended,%p,32)
              set %suspended $deltok(%suspended,$findtok(%suspended,$gettok(%suspended,%p,32),32),32)
            }
            elseif (%p == $gettok(%suspended,0,32)) {
              .notice $nick 7,1(0( $2 Was Not Found On The Suspension List )7)
              halt
            }
            inc %p
          }
          elseif (*!* !isin $2) && ($2 ison $chan) {
            if ($address($2,2) iswm $gettok(%suspended,%p,32)) {
              .notice $nick 7,1(0( $2 Has Been Removed From The Suspended List )7)
              unset % $+ $gettok(%suspended,%p,32)
              set %suspended $deltok(%suspended,$findtok(%suspended,$gettok(%suspended,%p,32),32),32)
            }
            elseif (%p == $gettok(%suspended,0,32)) {
              .notice $nick 7,1(0( $2 Was Not Found On The Suspension List )7)
              halt
            }
            inc %p
          }
          else {
            .notice $nick 7,1(0( This User Is Currently Not On The Channel, To Add Them Please Use There Address: *!*@username.user.gamesurge )7)
            halt
          }
        }
      }
      else {
        .notice $nick 7,1(0( $2 Was Not Found On The Suspension List )7)
      }
    }
    elseif ($1 == @staff) {
      if ($2 == suspend) {
        if (%staffsus) {
          var %p 1
          while (%p <= $gettok(%staffsus,0,32)) {
            if (*!* isin $3) {
              if ($3 iswm $gettok(%staffsus,%p,32)) {
                .notice $nick 7,1(0( $3 Is Already On The Staff Suspended List. You Can Not Suspend Again )7)
                halt
              }
            }
          }
        }
      }
      if ($2 == unsuspend) {
        notice $nick Out Of Order
      }
      if ($2 == *list) {
        unset %staff
        save -ru remote.ini
        if ($ini(remote.ini,users)) {
          var %p 1 
          while (%p <= $ini(remote.ini,users,0)) {
            set %staff %staff $gettok($readini(remote.ini,users,$ini(remote.ini,users,%p)),2,58) ( $+ $gettok($readini(remote.ini,users,$ini(remote.ini,users,%p)),1,58) $+ ) 
            inc %p
          }
          .notice $nick 7,1(0( %staff )7)
        }
      }
      elseif ($2 == add) {
        if ($4 isnum) && ($4 <= $ulevel) {
          $iif($3 ison $chan,whois $3,whois $chan)
          var %p 1
          while (%p <= $gettok(%staff,0,32)) {
            if ($3 ison $chan) {
              if ($address($3,2) == $gettok(%staff,%p,32)) {   
                .notice $nick 7,1(0( User: $3 ( $+ $address($3,2) $+ ) With $remove($gettok(%staff,$calc(%p + 1),32),$chr(41),$chr(40)) Access Already Exists )7)
                halt
              }
              elseif (%p == $gettok(%staff,0,32)) {
                /guser [-a] <levels> <nick> [type] [info]
                .notice $nick 7,1(0( Added User: $3 ( $+ $address($3,2) $+ ) With $4 Access )7).
                save -ru remote.ini
                halt
              }
              inc %p
            }
            elseif (*!*@ isin $3) {
              if ($3 == $gettok(%staff,%p,32)) {   
                .notice $nick 7,1(0( User: ( $+ $3 $+ ) With $remove($gettok(%staff,$calc(%p + 1),32),$chr(41),$chr(40)) Access Already Exists )7)
                halt
              }
              elseif (%p == $gettok(%staff,0,32)) {
                auser $4 $3
                .notice $nick 7,1(0( Added User: ( $+ $3 $+ ) With $4 Access )7)
                save -ru remote.ini
                halt
              }
              inc %p
            }
            else {
              .notice $nick 7,1(0( This User Is Currently Not On The Channel, To Add Them Please Use There Address: *!*@username.user.gamesurge )7)
              halt
            }
          }
        }
        else {
          .notice $nick 7,1(0( Incorrect Usage. Usage: @staff Add Nick/*!*Address Access Level (Note: Access Level Can Only Be Below Or Equal To Your Own Access Level) )7)
        }
      }
      elseif ($2 == del) {
        if (sv-vater isin $3) {
          notice $nick 7,1(0( Cannot Remove This User (Founder) )7)
          msg %mainbotchannel $+ -Staff 4Unauthorized Event: @staff del $3 Issued By: $nick Address: $address($nick,2)
          halt
        }
        if ($nick == $3) {
          notice $nick7,1(0( You Can Not Delete Your Self )7)
          halt
        }
        var %p 1
        while (%p <= $gettok(%staff,0,32)) {
          if ($3 ison $chan) {
            if ($address($3,2) == $gettok(%staff,%p,32)) {   
              ruser $address($3,2)
              ruser $3
              .notice $nick 7,1(0( User: $3 ( $+ $address($3,2) $+ ) With $remove($gettok(%staff,$calc(%p + 1),32),$chr(41),$chr(40)) Access Has Been Deleted )7)
              unset %staff
              save -ru remote.ini	
              halt
            }
            elseif (%p == $gettok(%staff,0,32)) {
              .notice $nick 7,1(0( User: $3 ( $+ $address($3,2) $+ ) Was Not Found On The List )7)
              halt
            }
            inc %p
          }
          elseif (*!*@ isin $3) {
            if ($3 == $gettok(%staff,%p,32)) {   
              ruser $3
              .notice $nick 7,1(0( User: ( $+ $3 $+ ) With $remove($gettok(%staff,$calc(%p + 1),32),$chr(41),$chr(40)) Access Has Been Deleted )7)            
              halt
            }
            elseif (%p == $gettok(%staff,0,32)) {
              .notice $nick 7,1(0( User: ( $+ $3 $+ ) With $remove($gettok(%staff,$calc(%p + 1),32),$chr(41),$chr(40)) Was Not Found On The Staff List )7)            
              halt
            }
            inc %p
          }
          else {
            .notice $nick 7,1(0( This User Is Currently Not On The Channel, To Delete Them Please Use There Address: *!*@username.user.gamesurge )7)
            halt          
          }
        }
      }
      elseif ($2 == edit) {
        if ($4 > 400) {
          notice $nick 7,1(0( That Access Level Is Invalid - 100 , 200 , 300 , 400 )7)
          halt
        }
        if (SV-vater isin $3) {
          notice $nick 7,1(0( Cannot Edit This User (Founder) )7)
          msg %mainbotchannel $+ -Staff 4Unauthorized Event: @staff edit $3 Issued By: $nick Address: $address($nick,2)
          halt
        }
        var %p 1
        while (%p <= $gettok(%staff,0,32)) {
          if ($3 ison $chan) {
            if ($address($3,2) == $gettok(%staff,%p,32)) {   
              auser $4 $address($3,2)
              .notice $nick 7,1(0( User: $3 ( $+ $address($3,2) $+ ) With $remove($gettok(%staff,$calc(%p + 1),32),$chr(41),$chr(40)) Access Now Has $4 )7)
              save -ru remote.ini	
              halt
            }
            elseif (%p == $gettok(%staff,0,32)) {
              .notice $nick 7,1(0( User: $3 ( $+ $address($3,2) $+ ) Was Not Found On The Staff List. You Must First Add The User )7)
              halt
            }
            inc %p
          }
          elseif (*!*@ isin $3) {
            if ($3 == $gettok(%staff,%p,32)) {  
              auser $4 $3 
              .notice $nick 7,1(0( User: $3 With $remove($gettok(%staff,$calc(%p + 1),32),$chr(41),$chr(40)) Access Now Has $4 )7)
              save -ru remote.ini	
              halt
            }
            elseif (%p == $gettok(%staff,0,32)) {
              .notice $nick 7,1(0( User: $3 Was Not Found On The Staff List. You Must First Add The User )7)
              halt
            }
            inc %p
          }
          else {
            .notice $nick 7,1(0( This User Is Currently Not On The Channel, To Edit Them Please Use There Address: *!*@username.user.gamesurge )7)
            halt          
          }
        }
      }
    }
  }
  if (%botnicks $+ -?? iswm $nick) {
    if ($1 == SLOTS) {
      inc %slots $2
      inc %hmbots
      set %slotscheck $3 There are currently %slots slots available out of $calc(%hmbots * 20) $+ . %slots $+ / $+ $calc(%hmbots * 20)
    }
    if ($1 == BOTNICKCON) {
      .notice $2 $3-
    }
    if ($1 == BOTNICKDEN) {
      set %botnicks $2
      .notice $3 $4-
      .notice $3 Attempting to change bot nicks back to %botnicks
      var %p 1 
      while (%p <= $nick(%mainbotchannel,0)) {
        if (%botnicks $+ -?? iswm $nick(%mainbotchannel,%p)) {
          .msg $nick(%mainbotchannel,%p) BOTNICKCHANGEBACK $3 %botnicks
        }
        inc %p
      }
      var %x 1 
      while (%x <= $nick(%mainbotchannel,0)) {
        if (%botnicks $+ -?? iswm $nick(%mainbotchannel,%p)) {
          .msg $nick(%mainbotchannel,%p) BOTNICKCHANGEBACK $3 %botnicks
        }
        inc %x
      }
    }
    if ($1 == INFO) {
      .notice $2 $3-
    }
    if ($1 == BOTJOIN) {
      .notice $2 $3-
    }
  }
}
on *:JOIN:#:{
  if ($ulevel >= 100) && ($ulevel <= 199) {
    .msg $chan 7,1(0( $nick ( $+ $address($nick,2) $+ ) Is A Level $ulevel %mainbotchannel Support Tech )7)
    mode $chan +v $nick
  }
  if ($ulevel >= 200) && ($ulevel <= 299) {
    .msg $chan 7,1(0( $nick ( $+ $address($nick,2) $+ ) Is A Level $ulevel %mainbotchannel Tech Admin )7)
    mode $chan +v $nick
  }
  if ($ulevel >= 300) && ($ulevel <= 399) {
    .msg $chan 7,1(0( $nick ( $+ $address($nick,2) $+ ) Is A Level $ulevel %mainbotchannel Senior Admin )7)
    mode $chan +v $nick
  }
  if ($ulevel >= 400) {
    .msg $chan 7,1(0( $nick ( $+ $address($nick,2) $+ ) Is A Level $ulevel %mainbotchannel Founder / Developer )7)
    mode $chan +v $nick
    unset %authname
  }
}
on *:NOTICE:*:*:{
  if ($nick == ChanServ) {
    if ($3 == has) {
      $iif($strip($5,b) > 300,accessaccept,accessdeny)
    }
    else {
      accessdeny
    }
  }
  else {
    accessdeny
  }
}
alias accessaccept {
  .timer $+ %n.chan 1 %timed PF $strip($remove($gettok(% [ $+ [ %n.chan ] ],2,32),$chr(40),$chr(41)),b) %n.chan 
  unset %n.chan
}
alias accessdeny {
  .msg %n.chan 7,1(0( $upper(%mainbotchannel) Application Recieved From $strip($remove($gettok(% [ $+ [ %n.chan ] ],2,32),$chr(40),$chr(41)),b) ( $+ $address($strip($remove($gettok(% [ $+ [ %n.chan ] ],2,32),$chr(40),$chr(41)),b),2) $+ ) - Status: Declined. Application Time: %timed $+ secs )7)
  .notice $strip($remove($gettok(% [ $+ [ %n.chan ] ],2,32),$chr(40),$chr(41)),b) 7,1(0( Your Channel Did Not Pass All The Requirments, Please Be Sure That Your Channel Is Registered With Chanserv, You Are Oped And Have 301 Access, And Your Channel Has Equal To Or Above 10 Users )7)
  .part %n.chan Channel Failed to Meet the Minimum Requirements.
  .msg %mainbotchannel $+ -Staff 4Registry: Channel: %n.chan Failed Username: $strip($remove($gettok(% [ $+ [ %n.chan ] ],2,32),$chr(40),$chr(41)),b) ( $address($strip($remove($gettok(% [ $+ [ %n.chan ] ],2,32),$chr(40),$chr(41)),b),2) )
  unset % [ $+ [ %n.chan ] ]
  unset %n.chan
  halt
}
alias hubnick {
  .notice $1 Hub Nick has been changed to $2 and saved to its variable.
  set %hubnick $2
}
alias PF {
  if ($nick($2,0) > 9) && (Chanserv ison $2) {
    var %bot $(%botnicks $+ - $+ $iif($r(0,1) == 1,10,0 $+ $r(1,9)),2)
    .notice $1 7,1(0( Your Channel Has Passed The Minimum Requirements! Sending %botnicks bot %bot to your channel! )7)
    .msg $2 7,1(0( $upper(%mainbotchannel) Application Received From $1 ( $+ $address($1,2) $+ ) - Status: Accepted Application Time: %timed $+ secs )7)
    .msg %mainbotchannel $+ -Staff 4Registry: Channel: $2 Passed Username: $1 ( $address($1,2) ) Sending Bot: %bot
    .msg %bot JOIN $2 $1 $address($1,2)
    part $2 Dispatched %botnicks %bot to your channel! Enjoy!
  }
  else {
    .msg $2 7,1(0( $upper(%mainbotchannel) Application Received From $1 ( $+ $address($1,2) $+ ) - Status: Declined. Application Time: %timed $+ secs )7)
    .notice $1 7,1(0( Your Channel Did Not Pass All The Requirments, Please Be Sure That Your Channel Is Registered With Chanserv, You Are Oped And Have 201 Access, And Your Channel Has Equal To Or Above 7 Users (Not including me or ChanServ) )7)
    .part $2 Channel Failed to Meet the Minimum Requirements.
    .msg %mainbotchannel $+ -Staff 4Registry: Channel: $2 Failed Username: $1 ( $address($1,2) )
    unset % $+ $2
  }
}
alias sort {
  window -ls @sort
  tokenize 32 $1-
  while ($1) { aline @sort $1 | tokenize 32 $2- }
  var %a 1,%r
  while ($line(@sort,%a)) var %r = %r $v1,%a = %a + 1
  window -c @sort
  return %r
}
alias slotscheck {
  .notice %slotscheck
  unset %slotscheck
  unset %slots 
  unset %hmbots
}