KillBot v.01 — File Browser

KillBotv.01v0.1 / KillBotv.01v0.1 / aliases.ini

aliases.ini — 51.05 KB — Download this file

[Aliases]
n0=/ssetchan set %homechans $$?="Enter your Home Channel:"
n1=/line echo 4 ----------------------------------------------------------------
n2=/sendtousers {
n3=  set %t $lines(userchats.txt)
n4=  set %c 1
n5=  if %c > %t goto end
n6=  :next
n7=  set %user $read -l $+ %c userchats.txt
n8=  if $token(1,32,%user) == $1 {
n9=    if %c >= %t {
n10=      unset %sent
n11=      goto end
n12=    }
n13=    inc %c
n14=    goto next
n15=  }
n16=  if %colors == 1 { msg = $+ $token(1,32,%user) $kilt(%msg) }
n17=  else { msg = $+ $token(1,32,%user) %msg }
n18=  if %c >= %t goto end
n19=  inc %c
n20=  goto next
n21=  :end
n22=}
n23=/sendtoall {
n24=  set %t $lines(activechats.txt)
n25=  set %c 1
n26=  if %c > %t goto end
n27=  :next
n28=  set %user $read -l $+ %c activechats.txt
n29=  if $token(1,32,%user) == $1 {
n30=    if %c >= %t {
n31=      unset %sent
n32=      goto end
n33=    }
n34=    inc %c
n35=    goto next
n36=  }
n37=  set %sent %sent $+ , $token(1,32,%user)
n38=  msg = $+ $token(1,32,%user) %msg
n39=  if %c >= %t {
n40=    ;echo sendtoall: sent to %sent
n41=    unset %sent
n42=    goto end
n43=  }
n44=  inc %c
n45=  goto next
n46=  :end
n47=}
n48=/sendtobots {
n49=  set %t $lines(botchats.txt)
n50=  set %c 1
n51=  if %c > %t goto end
n52=  :next
n53=  set %user $read -l $+ %c botchats.txt
n54=  if $token(1,32,%user) == $1 {
n55=    if %c >= %t { goto end }
n56=    inc %c
n57=    goto next
n58=  }
n59=  msg = $+ $token(1,32,%user) %msg
n60=  if %c >= %t {
n61=    unset %sent
n62=    goto end
n63=  }
n64=  inc %c
n65=  goto next
n66=  :end
n67=}
n68=/sendtoircii {
n69=  set %t $lines(irciichats.txt)
n70=  set %c 1
n71=  if %c > %t goto end
n72=  :next
n73=  set %user $read -l $+ %c irciichats.txt
n74=  if $token(1,32,%user) == $1 {
n75=    if %c >= %t {
n76=      unset %sent
n77=      goto end
n78=    }
n79=    inc %c
n80=    goto next
n81=  }
n82=  set %sent %sent $+ , $token(1,32,%user)
n83=  msg = $+ $token(1,32,%user) %msg
n84=  if %c >= %t {
n85=    ;echo sendtoircii sent to: %sent
n86=    unset %sent
n87=    goto end
n88=  }
n89=  inc %c
n90=  goto next
n91=  :end
n92=}
n93=/botwho {
n94=  msg = $+ $1 bbb Send $2 @ $3 from $me Party line members:  (* = master, @ = op)
n95=  set %t $lines(userchats.txt)
n96=  if %t == 0 {
n97=    msg = $+ $1 bbb Send $2 @ $3 from $me  none
n98=    goto bots
n99=  }
n100=  set %c 1
n101=  :next
n102=  set %read $read -l $+ %c userchats.txt
n103=  set %user $token(1,32,%read)
n104=  set %useradd $token(2,32,%read)
n105=  set %len 11 - $len(%user)
n106=  if 54 isin $level(%useradd) {
n107=    msg = $+ $1 bbb Send $2 @ $3 from $me * $+ %user $+ $str(%len,%q) $+ %useradd
n108=    if %c >= %t goto bots
n109=    inc %c 1
n110=    goto next
n111=  }
n112=  if 53 isin $level(%useradd) {
n113=    msg = $+ $1 bbb Send $2 @ $3 from $me  @ $+ %user $+ $str(%len,%q) $+ %useradd
n114=    if %c >= %t goto bots
n115=    inc %c 1
n116=    goto next
n117=  }
n118=  msg = $+ $1 bbb Send $2 @ $3 from $me   $+ %user $+ $str(%len,%q) $+ %useradd
n119=  if %c >= %t goto bots
n120=  inc %c 1
n121=  goto next
n122=  :bots
n123=  set %bots 1
n124=  msg = $+ $1 bbb Send $2 @ $3 from $me Bots connected:
n125=  set %t $lines(botchats.txt)
n126=  if %t == 0 { set %bots 0 | goto ircii }
n127=  set %c 1
n128=  :next2
n129=  set %read $read -l $+ %c botchats.txt
n130=  set %user $token(1,32,%read)
n131=  set %useradd $token(2,32,%read)
n132=  set %len 11 - $len(%user)
n133=  msg = $+ $1 bbb Send $2 @ $3 from $me   -> %user $+ $str(%len,%q) $+ %useradd KillBot
n134=  if %c >= %t goto ircii
n135=  inc %c 1
n136=  goto next2
n137=  :ircii
n138=  set %t $lines(irciichats.txt)
n139=  if %t == 0 { 
n140=    if %bots == 0 msg = $+ $1 none
n141=    halt
n142=  }
n143=  set %c 1
n144=  :next3
n145=  set %read $read -l $+ %c irciichats.txt
n146=  set %user $token(1,32,%read)
n147=  set %useradd $token(2,32,%read)
n148=  set %len 11 - $len(%user)
n149=  msg = $+ $1 bbb Send $2 @ $3 from $me   -> %user $+ $str(%len,%q) $+ %useradd IRCii Clone
n150=  if %c >= %t halt
n151=  inc %c 1
n152=  goto next3
n153=}
n154=/botwho { 
n155=  msg = $+ $1 Party line members:  (* = master, @ = op)
n156=  set %t $lines(userchats.txt)
n157=  set %c 1
n158=  :next
n159=  set %read $read -l $+ %c userchats.txt
n160=  set %user $token(1,32,%read)
n161=  set %useradd $token(2,32,%read)
n162=  set %len 11 - $len(%user)
n163=  if 54 isin $level(%useradd) {
n164=    msg = $+ $1   * $+ %user $+ $str(%len,%q) $+ %useradd
n165=    if %c >= %t goto bots
n166=    inc %c 1
n167=    goto next
n168=  }
n169=  if 53 isin $level(%useradd) {
n170=    msg = $+ $1   @ $+ %user $+ $str(%len,%q) $+ %useradd
n171=    if %c >= %t goto bots
n172=    inc %c 1
n173=    goto next
n174=  }
n175=  msg = $+ $1    %user $+ $str(%len,%q) $+ %useradd
n176=  if %c >= %t goto bots
n177=  inc %c 1
n178=  goto next
n179=  :bots
n180=  set %bots 1
n181=  msg = $+ $1 Bots connected:
n182=  set %t $lines(botchats.txt)
n183=  if %t == 0 { set %bots 0 | goto ircii }
n184=  set %c 1
n185=  :next2
n186=  set %read $read -l $+ %c botchats.txt
n187=  set %user $token(1,32,%read)
n188=  set %useradd $token(2,32,%read)
n189=  set %len 11 - $len(%user)
n190=  msg = $+ $1     -> %user $+ $str(%len,%q) $+ %useradd KillBot
n191=  if %c >= %t goto ircii
n192=  inc %c 1
n193=  goto next2
n194=  :ircii
n195=  set %t $lines(irciichats.txt)
n196=  if %t == 0 { 
n197=    if %bots == 0 msg = $+ $1     none
n198=    halt
n199=  }
n200=  set %c 1
n201=  :next3
n202=  set %read $read -l $+ %c irciichats.txt
n203=  set %user $token(1,32,%read)
n204=  set %useradd $token(2,32,%read)
n205=  set %len 11 - $len(%user)
n206=  msg = $+ $1     -> %user $+ $str(%len,%q) $+ %useradd IRCii Clone
n207=  if %c >= %t halt
n208=  inc %c 1
n209=  goto next3
n210=}
n211=/whoon {
n212=  if $null != $2 {
n213=    if $null != $read -s $+ $2 botchats.txt {
n214=      msg = $+ $2 bbb who $2 request from $1 @ $me
n215=      set %msg $timestamp $chr(35) $+ $1 $+ $chr(35) who $2
n216=      sendtousers
n217=      halt
n218=    }
n219=    set %msg bbb who $2 request from $1 @ $me
n220=    sendtobots
n221=    set %msg $timestamp $chr(35) $+ $1 $+ $chr(35) who $2
n222=    sendtousers
n223=    halt
n224=  }
n225=  set %msg $timestamp $chr(35) $+ $1 $+ $chr(35) who
n226=  sendtousers
n227=  msg = $+ $1 Party line members:  (* = master, @ = op)
n228=  set %t $lines(userchats.txt)
n229=  set %c 1
n230=  :next
n231=  set %read $read -l $+ %c userchats.txt
n232=  set %user $token(1,32,%read)
n233=  set %useradd $token(2,32,%read)
n234=  set %len 11 - $len(%user)
n235=  if 54 isin $level(%useradd) {
n236=    msg = $+ $1   * $+ %user $+ $str(%len,%q) $+ %useradd
n237=    if %c >= %t goto bots
n238=    inc %c 1
n239=    goto next
n240=  }
n241=  if 53 isin $level(%useradd) {
n242=    msg = $+ $1   @ $+ %user $+ $str(%len,%q) $+ %useradd
n243=    if %c >= %t goto bots
n244=    inc %c 1
n245=    goto next
n246=  }
n247=  msg = $+ $1    %user $+ $str(%len,%q) $+ %useradd
n248=  if %c >= %t goto bots
n249=  inc %c 1
n250=  goto next
n251=  :bots
n252=  set %bots 1
n253=  msg = $+ $1 Bots connected:
n254=  set %t $lines(botchats.txt)
n255=  if %t == 0 { set %bots 0 | goto ircii }
n256=  set %c 1
n257=  :next2
n258=  set %read $read -l $+ %c botchats.txt
n259=  set %user $token(1,32,%read)
n260=  set %useradd $token(2,32,%read)
n261=  set %len 11 - $len(%user)
n262=  msg = $+ $1     -> %user $+ $str(%len,%q) $+ %useradd KillBot
n263=  if %c >= %t goto ircii
n264=  inc %c 1
n265=  goto next2
n266=  :ircii
n267=  set %t $lines(irciichats.txt)
n268=  if %t == 0 { 
n269=    if %bots == 0 msg = $+ $1     none
n270=    halt
n271=  }
n272=  set %c 1
n273=  :next3
n274=  set %read $read -l $+ %c irciichats.txt
n275=  set %user $token(1,32,%read)
n276=  set %useradd $token(2,32,%read)
n277=  set %len 11 - $len(%user)
n278=  msg = $+ $1     -> %user $+ $str(%len,%q) $+ %useradd IRCii Clone
n279=  if %c >= %t halt
n280=  inc %c 1
n281=  goto next3
n282=}
n283=/checklines echo 4 There are $lines($1) in $1
n284=/onkick {
n285=  line
n286=  echo 4 *** $2 was kicked from %homechan by $1 for: *3
n287=  if (54 isin $level($address($1,3)) || 55 isin $level($address($1,3))) { set %msg $timestamp $address($2,1) kicked from %homechan by $address($1,5) $+ : *3 | sendtousers | halt }
n288=  if 52 isin $level($address($2,3)) kick %homechan $1 $2 is on my protect list.
n289=  set %msg $timestamp $address($2,5) kicked from %homechan by $address($1,5) $+ : *3
n290=  sendtousers
n291=}
n292=/onop {
n293=  line
n294=  echo 4 *** $2 was oped in %homechan by $1
n295=  if (54 isin $level($address($1,3)) || 55 isin $level($address($1,3))) { set %msg $timestamp %homechan $+ : mode change '+o $2 $+ ' by $address($1,5) | sendtousers | halt }
n296=  if 50 isin $level($address($2,3)) {
n297=    mode %homechan -o $2
n298=    set %msg $timestamp %homechan $+ : mode change '+o $2 $+ ' by $address($1,5)
n299=    sendtousers
n300=    set %msg $timestamp Illegal opping, $2 is on the NO-ops list.
n301=    sendtousers
n302=    echo 4 *** Illegal opping.
n303=  }
n304=  set %msg $timestamp %homechan $+ : mode change '+o $2 $+ ' by $address($1,5)
n305=  sendtousers
n306=}
n307=/ondeop {
n308=  line
n309=  echo 4 *** $2 was deoped in %homechan by $1
n310=  if $1 == $2 goto done
n311=  if 53 isin $level($address($2,3)) {
n312=    if (55 isin $level($address($1,3)) || 54 isin $level($address($1,3))) { set %msg $timestamp %homechan $+ : mode change '-o $2 $+ ' by $address($1,5) | sendtousers | halt }
n313=    mode %homechan +o $2
n314=    set %msg $timestamp %homechan $+ : mode change '-o $2 $+ ' by $address($1,5)
n315=    sendtousers
n316=    set %msg $timestamp Illegal deop on $2 $+ , re-opping.
n317=    sendtousers
n318=    echo 4 *** Illegal deop
n319=    halt
n320=  }
n321=  :done
n322=  set %msg $timestamp %homechan $+ : mode change '-o $2 $+ ' by $address($1,5)
n323=  sendtousers
n324=}
n325=/onban {
n326=  line
n327=  echo 4 *** $1 banned: $2 in %homechan
n328=  if (=55 isin $level($2)) { mode %homechan -b $2 | set %msg $timestamp %homechan $+ : mode change '+b $2 $+ ' by $address($1,5) | sendtousers | set %msg $timestamp Illegal ban by $1 $+ , unbanning $2 | sendtousers | halt }
n329=  else if (55 isin $level($address($1,3)) || 54 isin $level($address($1,3))) { set %kick 1 | goto nextkick | halt }
n330=  else if (52 isin $level($2) || 53 isin $level($2)) {
n331=    mode %homechan -b $2
n332=    set %msg $timestamp %homechan $+ : mode change '+b $2 $+ ' by $address($1,5)
n333=    sendtousers
n334=    set %msg $timestamp Illegal ban by $1 $+ , unbanning $2
n335=    sendtousers
n336=    halt
n337=  }
n338=  set %kick 1
n339=  :nextkick
n340=  if $null != $ial($2,%kick).nick { 
n341=    if $ial($2,%kick).nick !isop %homechan && $ial($2,%kick).nick ison %homechan {
n342=      kick %homechan $ial($2,%kick).nick KillBot banned
n343=    }
n344=    inc %kick
n345=    goto nextkick
n346=  }
n347=  set %msg $timestamp %homechan $+ : mode change '+b $2 $+ ' by $address($1,5)
n348=  sendtousers
n349=}
n350=/saveini {
n351=  line
n352=  echo 4 *** Saving ini's...
n353=  .save -a $mircdir $+ aliases.ini
n354=  .save -p $mircdir $+ popups.ini
n355=  .save -u $mircdir $+ remote.ini
n356=  .save -v $mircdir $+ remote.ini
n357=  .save -c $mircdir $+ remote.ini
n358=  .save -e $mircdir $+ remote.ini
n359=  .save -r $mircdir $+ remote.ini
n360=  echo 4 *** Saved :)
n361=}
n362=/adduser {
n363=   set %user $read -s $+ $1 userchats.txt
n364=  if %user == $null {
n365=    halt
n366=  } 
n367=  if 54 !isin $level(%user) {
n368=    msg = $+ $1 What? Try '.help'
n369=    halt
n370=  }
n371=  if $2 !ison %homechan {
n372=    msg = $+ $1 $2 wasn't found in %homechan $+ , Sorry.
n373=    halt
n374=  }
n375=  if $null != $read -s $+ $address($2,3) users.txt { msg = $+ $1 Sorry, that address is already used by: $read -s $+ $address($2,3) users.txt | halt }
n376=  if $null != $read -s $+ $2 users2.txt {
n377=    msg = $+ $1 There was already someone with that nickname on the bot using the address: $read -s $+ $2 users2.txt
n378=    halt
n379=  }
n380=  write users2.txt $2 $address($2,3)
n381=  write users.txt $address($2,3) $2
n382=  auser -a 1,=10 $address($2,3)
n383=  set %msg $timestamp $chr(35) $+ $1 $+ $chr(35) adduser $2
n384=  sendtousers
n385=  save -u remote.ini
n386=  msg = $+ $1 $2 has been added to the userlist.
n387=}
n388=/remuser {
n389=  echo 4 *** Attempting to remove: $2 from the userlist, commanded by $1
n390=  set %user $read -s $+ $1 userchats.txt
n391=  if %user == $null {
n392=    echo 4 *** $1 is a bot and cannot give those types of commands, procedure halted.
n393=    halt
n394=  } 
n395=  if 54 !isin $level(%user) {
n396=    echo 4 *** $1 $+ 's attempt to remove $2 failed (No Access)
n397=    msg = $+ $1 What? Try '.help'
n398=    halt
n399=  }
n400=  set %userremove $read -s $+ $2 users2.txt
n401=  if %userremove == $null {
n402=    msg = $+ $1 Sorry, $2 was not found on the userlist.
n403=    halt
n404=  }
n405=  if 55 isin $level(%user) goto next
n406=  if 54 isin $level(%user) && 54 isin $level(%userremove) {
n407=    msg = $+ $1 Sorry, you can't remove a master.
n408=    halt
n409=  }
n410=  if 54 isin $level(%user) && 55 isin $level(%userremove) {
n411=    msg = $+ $1 HAHAHAHAH, you can't remove a user with owner access, you don't have the POWER.
n412=    halt
n413=  }
n414=  :next
n415=  ruser 1,10,50,51,52,53,54,55,56 $read -s $+ $2 users2.txt
n416=  write -ds $+ $read -s $+ $2 users2.txt users.txt
n417=  write -ds $+ $2 users2.txt
n418=  set %msg $timestamp $chr(35) $+ $1 $+ $chr(35) -user $2
n419=  sendtousers
n420=  save -u remote.ini
n421=  msg = $+ $1 $2 has been removed from the userlist.
n422=}
n423=/luser {
n424=  set %usera $read -s $+ $1 userchats.txt
n425=  if 54 !isin $level(%usera) {
n426=    msg = $+ $1 What?  Try '.help'
n427=    halt
n428=  }
n429=  line
n430=  echo 4 *** Sending user list to $1
n431=  set %msg $timestamp $chr(35) $+ $1 $+ $chr(35) lusers
n432=  sendtousers
n433=  msg = $+ $1 User list:  (* = master, @ = op)
n434=  set %t $lines(users2.txt)
n435=  set %c 1
n436=  :next
n437=  set %read $read -l $+ %c users2.txt
n438=  set %user $token(1,32,%read)
n439=  set %useradd $token(2,32,%read)
n440=  set %len 11 - $len(%user)
n441=  if 54 isin $level(%useradd) {
n442=    getflags %useradd
n443=    msg = $+ $1   * $+ %user $+ $str(%len,%q) $+ %useradd (flags: %s $+ )
n444=    if %c >= %t halt
n445=    inc %c 1
n446=    goto next
n447=  }
n448=  if 53 isin $level(%useradd) {
n449=    getflags %useradd
n450=    msg = $+ $1   @ $+ %user $+ $str(%len,%q) $+ %useradd (flags: %s $+ )
n451=    if %c >= %t halt
n452=    inc %c 1
n453=    goto next
n454=  }
n455=  getflags %useradd
n456=  msg = $+ $1    %user $+ $str(%len,%q) $+ %useradd (flags: %s $+ )
n457=  if %c >= %t halt
n458=  inc %c 1
n459=  goto next
n460=}
n461=/getflags { set %s + | if 50 isin $level($1) set %s %s $+ d | if 51 isin $level($1) set %s %s $+ f | if 52 isin $level($1) set %s %s $+ p | if 53 isin $level($1) set %s %s $+ o | if 54 isin $level($1) set %s %s $+ m | if 55 isin $level($1) set %s %s $+ n }
n462=/bothelp {
n463=  line *** $1 requested help
n464=  set %useradd $read -s $+ $1 userchats.txt
n465=  set %msg $timestamp $chr(35) $+ $1 $+ $chr(35) help
n466=  sendtousers
n467=  qplay = $+ $1 help1.txt
n468=  if 51 isin $level(%useradd) { qplay = $+ $1 helpf.txt }
n469=  if 53 isin $level(%useradd) { qplay = $+ $1 helpo.txt }
n470=  if 54 isin $level(%useradd) { qplay = $+ $1 helpm.txt }
n471=  if 55 isin $level(%useradd) { qplay = $+ $1 helpn.txt }
n472=  qplay = $+ $1 helpend.txt
n473=}
n474=/bothelp2 {
n475=  set %user $read -s $+ $1 userchats.txt
n476=  if 55 isin $level(%user) {
n477=     if $2 isin set {
n478=      set %msg $timestamp $chr(35) $+ $1 $+ $chr(35) help set
n479=      sendtousers
n480=      play -t $+ $2 = $+ $1 help.txt 0
n481=      halt
n482=    }
n483=   if $2 isin xdccresetchannels+channel-channelsetadminsetxdccdirxdccofferxdccremovekillnetonkillnetoffxdcconxdccoffsetsetkillnetsethomechansetdiesetfservesetfservelimitsetdcclimitsetfservedir {
n484=      set %msg $timestamp $chr(35) $+ $1 $+ $chr(35) help *3
n485=      sendtousers
n486=      play -t $+ $2 = $+ $1 help.txt 0
n487=      halt
n488=    }
n489=  }
n490=  if 54 isin $level(%user) {
n491=    if $2 isin dccstatschattradduser-userlusersunlinklinkjumpdiejoinpart {
n492=      set %msg $timestamp $chr(35) $+ $1 $+ $chr(35) help $2
n493=      sendtousers
n494=      play -t $+ $2 = $+ $1 help.txt 0
n495=      halt
n496=    }
n497=  }
n498=  if 53 isin $level(%user) {
n499=    if $2 isin opdeoptopicsaymsg {
n500=      set %msg $timestamp $chr(35) $+ $1 $+ $chr(35) help $2
n501=      sendtousers
n502=      play -t $+ $2 = $+ $1 help.txt 0
n503=      halt
n504=    }
n505=    if 51 isin $level(%user) {
n506=      if $2 isin knmfknpfknjoinknslowjoinknpartknmsgknvfknef {
n507=        set %msg $timestamp $chr(35) $+ $1 $+ $chr(35) help *3
n508=        sendtousers
n509=        play -t $+ $2 = $+ $1 help.txt 0
n510=        halt
n511=      }
n512=    }
n513=  }
n514=  if $2 isin whoisxdcclistxdccsendwhomotdquitwhoamifserve {
n515=    set %msg $timestamp $chr(35) $+ $1 $+ $chr(35) help $2
n516=    sendtousers
n517=    play -t $+ $2 = $+ $1 help.txt 0
n518=    halt
n519=  }
n520=  msg = $+ $1 No help available on that.
n521=}
n522=/onchatop {
n523=  set %user $read -s $+ $1 userchats.txt
n524=  if 53 !isin $level(%user) {
n525=    msg = $+ $1 What?  Try '.help'
n526=    halt
n527=  }
n528=  if $null == $3 { set %homechan $gettok(%homechans,1,32) }
n529=  else { set %homechan $3 }
n530=  if $2 !ison %homechan {
n531=    set %msg $timestamp $chr(35) $+ $1 $+ $chr(35) op $2
n532=    sendtousers
n533=    msg = $+ $1 $2 isn't on %homechan $+ .
n534=    halt
n535=  }
n536=  set %user $read -s $+ $2 users2.txt
n537=  if 53 !isin $level(%user) {
n538=    set %msg $timestamp $chr(35) $+ $1 $+ $chr(35) op $2
n539=    sendtousers
n540=    msg = $+ $1 Sorry, $2 isn't on my op list.
n541=    halt
n542=  }
n543=  mode %homechan +o $2
n544=  set %msg $timestamp $chr(35) $+ $1 $+ $chr(35) op $2
n545=  sendtousers
n546=  msg = $+ $1 Gave Op to $2 on %homechan
n547=}
n548=/onchatdeop {
n549=  set %user $read -s $+ $1 userchats.txt
n550=  if 53 !isin $level(%user) {
n551=    msg = $+ $1 What? Try '.help'
n552=    halt
n553=  }
n554=  if $null == $3 { set %homechan $gettok(%homechans,1,32) }
n555=  else { set %homechan $3 }
n556=  if $2 !ison %homechan {
n557=    set %msg $timestamp $chr(35) $+ $1 $+ $chr(35) deop $2
n558=    sendtousers
n559=    msg = $+ $1 $2 isn't on %homechan $+ .
n560=    halt
n561=  }
n562=  set %user $read -s $+ $2 users2.txt
n563=  if 53 isin $level(%user) {
n564=    set %msg $timestamp $chr(35) $+ $1 $+ $chr(35) deop $2
n565=    sendtousers
n566=    msg = $+ $1 $2 is +o in the user list.
n567=    halt
n568=  }
n569=  set %msg $timestamp $chr(35) $+ $1 $+ $chr(35) deop $2
n570=  sendtousers
n571=  mode %homechan -o $2
n572=  msg = $+ $1 Deoping $2 on %homechan
n573=}
n574=/onchattopic {
n575=  set %user $read -s $+ $1 userchats.txt
n576=  if 53 !isin $level(%user) {
n577=    msg = $+ $1 What? Try '.help'
n578=    halt
n579=  }
n580=  if # !isin $2 { set %homechan $gettok(%homechans,1,32) }
n581=  else { set %homechan $3 }
n582=  /topic %homechan *2
n583=  msg = $+ $1 changing topic...
n584=  set %msg $timestamp $chr(35) $+ $1 $+ $chr(35) topic *2
n585=  sendtousers
n586=}
n587=/onchatsay {
n588=  set %user $read -s $+ $1 userchats.txt
n589=  if 53 !isin $level(%user) {
n590=    msg = $+ $1 What? Try '.help'
n591=    halt
n592=  }
n593=  if # !isin $2 { set %homechan $gettok(%homechans,1,32) }
n594=  else { set %homechan $3 }
n595=  msg %homechan *2
n596=  set %msg $timestamp $chr(35) $+ $1 $+ $chr(35) say *2
n597=  sendtousers
n598=}
n599=/onchatmsg {
n600=  set %user $read -s $+ $1 userchats.txt
n601=  if 53 !isin $level(%user) {
n602=    msg = $+ $1 What? Try '.help'
n603=    halt
n604=  }
n605=  msg *2
n606=  set %msg $timestamp $chr(35) $+ $1 $+ $chr(35) msg *2
n607=  sendtousers
n608=}
n609=/onprivmsg {
n610=  echo 4 *** Private message from $1
n611=  set %msg $timestamp $chr(91) $+ $2 $+ $chr(93) *3
n612=  sendtousers
n613=  .timer 1 1 closemsg $1
n614=}
n615=/newbot {
n616=  line
n617=  echo 4 *** $1 is a bot, adding to list.
n618=  write botchats.txt $1 $read -s $+ $1 userchats.txt
n619=  write -ds $+ $1 userchats.txt
n620=  set %msg *** Linked to $1
n621=  sendtousers
n622=  set %msg bbb Linked $1 @ $me
n623=  sendtobots $1
n624=}
n625=/newirciibot {
n626=  line
n627=  echo 4 *** $1 is a bot, adding to list.
n628=  write irciichats.txt $1 $read -s $+ $1 userchats.txt
n629=  write -ds $+ $1 userchats.txt
n630=  set %msg *** Linked to $1
n631=  sendtousers
n632=  set %msg bbb Linked $1 @ $me
n633=  sendtobots $1
n634=}
n635=/linkto {
n636=  set %usera $read -s $+ $1 userchats.txt
n637=  if 54 !isin $level(%usera) {
n638=    msg = $+ $1 What? Try '.help'
n639=    halt
n640=  }
n641=  ctcp $2 LINK
n642=  set %msg *** Attempting to link to $2
n643=  sendtousers
n644=}
n645=/unlinkfrom {
n646=  set %usera $read -s $+ $1 userchats.txt
n647=  if 54 !isin $level(%usera) {
n648=    msg = $+ $1 What? Try '.help'
n649=    halt
n650=  }
n651=  set %user $read -s $+ $2 botchats.txt
n652=  if $null == %user {
n653=    msg = $+ $1 Sorry, $2 isn't a bot, or he isn't linked at this time
n654=    halt
n655=  }
n656=  write -ds $+ $2 activechats.txt
n657=  write -ds $+ $2 botchats.txt
n658=  close -c $2
n659=  set %msg $timestamp $chr(35) $+ $1 $+ $chr(35) unlink $2
n660=  sendtousers
n661=  set %msg *** Lost bot: $2
n662=  sendtousers
n663=  set %msg bbb Lost Bot $2 @ $me
n664=  sendtobots
n665=}
n666=/loadini {
n667=  echo 4 Loading ini's
n668=  load -a $mircdir $+ aliases.ini
n669=  load -p $mircdir $+ popups.ini
n670=  load -u $mircdir $+ remote.ini
n671=  load -v $mircdir $+ remote.ini
n672=  load -c $mircdir $+ remote.ini
n673=  load -e $mircdir $+ remote.ini
n674=  load -r $mircdir $+ remote.ini
n675=  echo 4 Load Complete
n676=}
n677=/clearchats {
n678=  set %t $chat(0)
n679=  set %c 1
n680=  :next
n681=  close -c $chat(%c)
n682=  if %c >= %t goto write
n683=  inc %c
n684=  goto next
n685=  :write
n686=  write -c activechats.txt
n687=  write -c botchats.txt
n688=  write -c userchats.txt
n689=  write -c irciichats.txt
n690=  echo 4 *** Chats cleared
n691=}
n692=/delaychatopen {
n693=  set %user $read -s $+ $1 userchats.txt
n694=  if $null != %user {
n695=    msg = $+ $1                              graphix by krome
n696=    msg = $+ $1  
n697=    qmotdplay = $+ $1 motd.txt
n698=    msg = $+ $1  
n699=    msg = $+ $1 Commands start with '.' (like '.quit' or '.help')
n700=    msg = $+ $1 Everything else goes out to the party line.
n701=    msg = $+ $1  
n702=    set %read $read -s $+ $1 botchats.txt
n703=    set %msg *** $1 joined the party line.
n704=    sendtousers
n705=    set %msg bbb $1 joined party line @ $me
n706=    sendtobots
n707=    set %u $read -s $+ $1 userchats.txt | set %u $read -s $+ %u users.txt | set %r $read -s $+ %u notes.txt | if $null == %r { msg = $+ $1 You have no messages waiting. | halt }
n708=    msg = $+ $1 ### You have the following notes waiting:
n709=    notes $1 %u read
n710=    msg = $+ $1 ### Use '.notes erase' to erase them.
n711=  }
n712=}
n713=/qmotdplay {
n714=  if $exists($2) == $false halt
n715=  msg $1 0,15 0,14 0,1 0,2 4,1     -     1,4K4,1i1,4L4,1L1,4B4,1o1,4T1,1 4,1M1,4o4,1T1,4D4,1     -     4,1 0,2 0,1 0,14 0,15 
n716=  set %t $lines($2)
n717=  set %c 1
n718=  :next
n719=  msg $1 0,15 0,14 0,1 0,2 4,1  $read -l $+ %c $2
n720=  if %c >= %t goto end
n721=  inc %c
n722=  goto next
n723=  :end
n724=  msg $1 0,15 0,14 0,1 0,2 4,1                                           4,1 0,2 0,1 0,14 0,15 
n726=}
n728=/qplay {
n729=  if $exists($2) == $false halt
n730=  set %t $lines($2)
n731=  set %c 1
n732=  :next
n733=  msg $1 $read -l $+ %c $2
n734=  if %c >= %t goto end
n735=  inc %c
n736=  goto next
n737=  :end
n738=}
n739=/splay {
n740=  if $exists($2) == $false { echo 4 *** The file $2 does not exist | halt }
n741=  set %t $lines($2)
n742=  set %c 1
n743=  set %s 1
n744=  :next
n745=  .timer 1 %s msg $1 $read -l $+ %c $2
n746=  if %c >= %t goto end
n747=  inc %c
n748=  %s = %s + $3
n749=  goto next
n750=  :end
n751=}
n752=/nsplay {
n753=  if $exists($2) == $false { echo 4 *** The file $2 does not exist | halt }
n754=  if $null == $3 { echo 4 No delay specified, halting | halt }
n755=  set %t $lines($2)
n756=  set %c 1
n757=  set %s 1
n758=  :next
n759=  .timer 1 %s notice $1 $read -l $+ %c $2
n760=  if %c >= %t goto end
n761=  inc %c
n762=  %s = %s + $3
n763=  goto next
n764=  :end
n765=}
n766=/bc {
n767=  if $null != $read -s $+ $1 userchats.txt { 
n768=    ig $1
n769=    set %msg < $+ $1 $+ > *2
n770=    sendtousers $1
n771=    set %msg bbb PL $1 @ $me says *2
n772=    sendtobots
n773=    halt
n774=  }
n775=  set %msg *2
n776=  sendtobots $1
n777=}
n778=/getreadyforrelease {
n779=  if $?="Are you sure you want to do this?" != yes halt
n780=  echo 4 *** Reseting everything...
n781=  write -c users.txt
n782=  write -c users2.txt
n783=  write -c notes.txt
n784=  write -c check.txt
n785=  clearchats
n786=  rlevel 1
n787=  unset %homechan
n788=  unset %owner
n789=set %xdcclist 0
n790=set %xdccdir c:\
n791=  set %killnet 0
n792=  set %fservemsg 0
n793=  set %fserve 0
n794=  set %fservelimit 1
n795=  set %dcclimit 1
n796=  set %fservedir c:\
n797=  set %icmpip1 none
n798=  set %icmpip2 none
n799=  set %icmpip3 none
n800=  set %icmptime1
n801=  set %icmptime2
n802=  set %icmptime3
n803=}
n804=/setkillnet {
n805=  set %useradd $read -s $+ $1 userchats.txt
n806=  if 55 !isin $level(%useradd) {
n807=    msg = $+ $1 What? Try '.help'
n808=    halt
n809=  }
n810=  if $null == $2 {
n811=    set %msg $timestamp $chr(35) $+ $1 $+ $chr(35) set KillNet
n812=    sendtousers
n813=    msg = $+ $1 Currently: %KillNet
n814=    halt
n815=  }
n816=  set %msg $timestamp $chr(35) $+ $1 $+ $chr(35) set KillNet $2
n817=  sendtousers
n818=  set %killnet $2
n819=  msg = $+ $1 Ok, set.
n820=  if $2 == 1 enable #killnet
n821=  if $2 == 0 disable #killnet
n822=}
n823=/botmsg {
n824=  msg = $+ $1 *** $chr(91) $+ $2 $+ $chr(93) *3
n825=}
n826=/whoami {
n827=  set %msg $timestamp $chr(35) $+ $1 $+ $chr(35) whoami
n828=  sendtousers
n829=  msg = $+ $1 Your nick is: $1
n830=  set %u $read -s $+ $1 userchats.txt
n831=  msg = $+ $1 Your address is: %u
n832=  msg = $+ $1 The bot knows you as: $read -s $+ %u users.txt
n833=  getflags %u
n834=  msg = $+ $1 Your flags are: %s
n835=}
n836=/ig {
n837=  if $null != $read -s $+ $1 ignore.txt halt
n838=  if $null == $read -s $+ $1 check.txt { write check.txt $1 0 }
n839=  set %x $read -s $+ $1 check.txt
n840=  set %usera $read -s $+ $1 userchats.txt
n841=  if =55 isin $level(%usera) goto skip
n842=  if %x > 2 {
n843=    write ignore.txt $1 1
n844=    set %msg *** Flood detected from $1 $+ , ignoring for 10 seconds.
n845=    sendtousers
n846=    msg = $+ $1 You are being ignored for the next ten seconds, please don't flood again
n847=    .timer 1 10 msg = $+ $1 You may speak now, be good. :)
n848=    .timer 1 10 write -ds $+ $1 ignore.txt
n849=    .timer 1 10 write -ds $+ $1 check.txt
n850=    set %f 1
n851=  }
n852=  :skip
n853=  inc %x 1
n854=  write -ds $+ $1 check.txt
n855=  write check.txt $1 %x
n856=  .timer 1 4 cf $1
n857=  if %f == 1 { unset %f | halt }
n858=}
n859=/cf {
n860=  set %b $read -s $+ $1 check.txt
n861=  dec %b 1
n862=  write -ds $+ $1 check.txt
n863=  write check.txt $1 %b
n864=}
n865=/fservestats {
n866=  msg = $+ $1 KillBot File Server stats:
n867=  msg = $+ $1 Max Dcc sends: %dcclimit
n868=  msg = $+ $1 Channel Msg: %fservemsg
n869=  msg = $+ $1 Max Fserves: %fservelimit
n870=  msg = $+ $1 Dir: %fservedir
n871=  if %fserve == 1 set %fs on
n872=  else set %fs off
n873=  msg = $+ $1 File Server is currently: %fs
n874=  msg = $+ $1 Type .help set for more info on how to change this.
n875=}
n876=/xdccstats {
n877=set %msg $timestamp $chr(35) $+ $1 $+ $chr(35) xdcc stats
n878=sendtousers
n879=msg = $+ $1 KillBot Xdcc stats:
n880=msg = $+ $1 Max Dcc sends: %dcclimit
n881=msg = $+ $1 Xdcc Dir: %xdccdir
n882=msg = $+ $1 Packs Offered: $lines(xdcclist.txt)
n883=msg = $+ $1 Total Leeched: %leeched $+ K
n884=if %xdcclist == 1 set %t on
n885=else set %t off
n886=msg = $+ $1 Xdcc is currently: %t
n887=}
n888=/copy {
n889=  write -c $$2
n890=  set %t $lines($$1)
n891=  set %c 1
n892=  :next
n893=  write $2 $read -l $+ %c $1
n894=  if %c >= %t goto end
n895=  inc %c
n896=  goto next
n897=  :end
n898=}
n899=/notes {
n900=  if $3 == read {
n901=    copy notes.txt temp.txt
n902=    set %c 1
n903=    :next
n904=    set %r $read -s $+ $2 temp.txt
n905=    msg = $+ $1 %c $+ . %r
n906=    write -ds $+ $2 temp.txt
n907=    set %r $read -s $+ $2 temp.txt
n908=    if $null == %r { write -c temp.txt | goto end }
n909=    inc %c
n910=    goto next
n911=  }
n912=  :next2
n913=  write -ds $+ $2 notes.txt
n914=  set %r $read -s $+ $2 notes.txt
n915=  if $null == %r { set %msg $timestamp $chr(35) $+ $1 $+ $chr(35) notes erase | sendtousers | halt }
n916=  goto next2
n917=  :end
n918=}
n919=/ef {
n920=  set %igt 0
n921=  if %floodgate == 1 {
n922=    if $null != $1 { inc %igt 10 }
n923=    if $null != $2 { inc %igt 10 }
n924=    if $null != $3 { inc %igt 10 }
n925=    goto finish
n926=  }
n927=  if $null != $1 {
n928=    inc %igt 10
n929=    ctcp $1 echo $str(454, )
n930=  }
n931=  if $null != $2 {
n932=    inc %igt 10
n933=    .timer 1 4 ctcp $2 echo $str(454, )
n934=  }
n935=  if $null != $3 {
n936=    inc %igt 10
n937=    .timer 1 9 ctcp $3 echo $str(454, )
n938=  }
n939=  :finish
n940=  disable #killnet
n941=  set %flooding 1
n942=  .timer 1 %igt set %flooding 0
n943=  .timer 1 %igt enable #killnet
n944=  set %msg 4*** Disabling KillNet for %igt seconds... | sendtousers
n945=  .timer 1 %igt set %msg 4*** KillNet enabled
n946=  .timer 1 %igt sendtousers
n947=}
n948=/vf {
n949=  set %igt 0
n950=  if %floodgate == 1 {
n951=    if $null != $1 { inc %igt 10 }
n952=    if $null != $2 { inc %igt 10 }
n953=    if $null != $3 { inc %igt 10 }
n954=    goto finish
n955=  }
n956=  if $null != $1 {
n957=    inc %igt 10
n958=    ctcp $1 version
n959=    ctcp $1 version
n960=    ctcp $1 version
n961=    ctcp $1 version
n962=    ctcp $1 version
n963=    ctcp $1 version
n964=    ctcp $1 version
n965=    ctcp $1 version
n966=  }
n967=  if $null != $2 {
n968=    inc %igt 10
n969=    .timer 1 2 ctcp $2 version
n970=    .timer 1 2 ctcp $2 version
n971=    .timer 1 2 ctcp $2 version
n972=    .timer 1 2 ctcp $2 version
n973=    .timer 1 2 ctcp $2 version
n974=    .timer 1 2 ctcp $2 version
n975=    .timer 1 2 ctcp $2 version
n976=    .timer 1 2 ctcp $2 version
n977=  }
n978=  if $null != $3 {
n979=    inc %igt 10
n980=    .timer 1 5 ctcp $3 version
n981=    .timer 1 5 ctcp $3 version
n982=    .timer 1 5 ctcp $3 version
n983=    .timer 1 5 ctcp $3 version
n984=    .timer 1 5 ctcp $3 version
n985=    .timer 1 5 ctcp $3 version
n986=    .timer 1 5 ctcp $3 version
n987=  }
n988=  :finish
n989=  disable #killnet
n990=  set %flooding 1
n991=  .timer 1 %igt set %flooding 0
n992=  .timer 1 %igt enable #killnet
n993=  set %msg 4*** Disabling KillNet for %igt seconds... | sendtousers
n994=  .timer 1 %igt set %msg 4*** KillNet enabled
n995=  .timer 1 %igt sendtousers
n996=}
n997=/mf {
n998=  set %igt 0
n999=  if %floodgate == 1 {
n1000=    if $null != $1 { inc %igt 10 }
n1001=    if $null != $2 { inc %igt 10 }
n1002=    if $null != $3 { inc %igt 10 }
n1003=    goto finish
n1004=  }
n1005=  if $null != $1 {
n1006=    inc %igt 10
n1007=    ctcp $1 ping
n1008=    ctcp $1 time
n1009=    ctcp $1 clientinfo
n1010=    ctcp $1 userinfo
n1011=    ctcp $1 version
n1012=    ctcp $1 finger
n1013=    raw -q privmsg $1 :DCC Accept X.X
n1014=    raw -q privmsg $1 :DCC Resume X.X
n1015=  }
n1016=  if $null != $2 {
n1017=    inc %igt 10
n1018=    .timer 1 2 ctcp $2 ping
n1019=    .timer 1 2 ctcp $2 time
n1020=    .timer 1 2 ctcp $2 clientinfo
n1021=    .timer 1 2 ctcp $2 userinfo
n1022=    .timer 1 2 ctcp $2 version
n1023=    .timer 1 2 ctcp $2 finger
n1024=    .timer 1 2 raw -q privmsg $1 :DCC Accept X.X
n1025=    .timer 1 2 raw -q privmsg $1 :DCC Resume X.X
n1026=  }
n1027=  if $null != $3 {
n1028=    inc %igt 10
n1029=    .timer 1 5 ctcp $2 ping
n1030=    .timer 1 5 ctcp $2 time
n1031=    .timer 1 5 ctcp $2 clientinfo
n1032=    .timer 1 5 ctcp $2 userinfo
n1033=    .timer 1 5 ctcp $2 version
n1034=    .timer 1 5 ctcp $2 finger
n1035=    .timer 1 5 raw -q privmsg $1 :DCC Accept X.X
n1036=    .timer 1 5 raw -q privmsg $1 :DCC Resume X.X
n1037=  }
n1038=  :finish
n1039=  disable #killnet
n1040=  set %flooding 1
n1041=  .timer 1 %igt set %flooding 0
n1042=  .timer 1 %igt enable #killnet
n1043=  set %msg *** 4Disabling KillNet for %igt seconds... | sendtousers
n1044=  .timer 1 %igt set %msg 4*** KillNet enabled
n1045=  .timer 1 %igt sendtousers
n1046=}
n1047=/pf {
n1048=  set %igt 0
n1049=  if %floodgate == 1 {
n1050=    if $null != $1 { inc %igt 10 }
n1051=    if $null != $2 { inc %igt 10 }
n1052=    if $null != $3 { inc %igt 10 }
n1053=    goto finish
n1054=  }
n1055=  if $null != $1 {
n1056=    inc %igt 10
n1057=    ctcp $1 ping
n1058=    ctcp $1 ping
n1059=    ctcp $1 ping
n1060=    ctcp $1 ping
n1061=    ctcp $1 ping
n1062=    ctcp $1 ping
n1063=    ctcp $1 ping
n1064=    ctcp $1 ping
n1065=  }
n1066=  if $null != $2 {
n1067=    inc %igt 10
n1068=    .timer 1 2 ctcp $2 ping
n1069=    .timer 1 2 ctcp $2 ping
n1070=    .timer 1 2 ctcp $2 ping
n1071=    .timer 1 2 ctcp $2 ping
n1072=    .timer 1 2 ctcp $2 ping
n1073=    .timer 1 2 ctcp $2 ping
n1074=    .timer 1 2 ctcp $2 ping
n1075=    .timer 1 2 ctcp $2 ping
n1076=  }
n1077=  if $null != $3 {
n1078=    inc %igt 10
n1079=    .timer 1 5 ctcp $3 ping
n1080=    .timer 1 5 ctcp $3 ping
n1081=    .timer 1 5 ctcp $3 ping
n1082=    .timer 1 5 ctcp $3 ping
n1083=    .timer 1 5 ctcp $3 ping
n1084=    .timer 1 5 ctcp $3 ping
n1085=    .timer 1 5 ctcp $3 ping
n1086=  }
n1087=  :finish
n1088=  disable #killnet
n1089=  set %flooding 1
n1090=  .timer 1 %igt set %flooding 0
n1091=  .timer 1 %igt enable #killnet
n1092=  set %msg 4*** Disabling KillNet for %igt seconds... | sendtousers
n1093=  .timer 1 %igt set %msg 4*** KillNet enabled
n1094=  .timer 1 %igt sendtousers
n1095=}
n1096=/sjoinircii {
n1097=  set %t $lines(irciichats.txt)
n1098=  set %c 1
n1099=  :next
n1100=  set %user $read -l $+ %c irciichats.txt
n1101=  if $token(1,32,%user) == $1 {
n1102=    if %c >= %t {
n1103=      echo 4 *** Sent %sent $+ : %msg
n1104=      unset %sent
n1105=      goto end
n1106=    }
n1107=    inc %c
n1108=    goto next
n1109=  }
n1110=  set %sent %sent $+ , $token(1,32,%user)
n1111=  msg = $+ $token(1,32,%user) bbb KN SJ someone @ $me $1 $rand(1,$2)
n1112=  if %c >= %t {
n1113=    echo 4 *** Sent %sent $+ : %msg
n1114=    unset %sent
n1115=    goto end
n1116=  }
n1117=  inc %c
n1118=  goto next
n1119=  :end
n1120=}
n1121=/xdccoffer {
n1122=set %u $read -s $+ $1 userchats.txt
n1123=if 55 !isin $level(%u) { msg = $+ $1 What? Try '.help' | halt }
n1124=set %check %xdccdir $+ $2
n1125=echo checking %check: $exists(%check)
n1126=if $false == $exists(%check) {
n1127=msg = $+ $1 Sorry, the file $2 could not be found in %xdccdir
n1128=halt
n1129=}
n1130=set %fs $lof(%check)
n1131=%fs = %fs / 1024
n1132=write xdcclist.txt $2 $+ $chr(58) $+ %fs $+ $chr(58) $+ *3
n1133=set %n $lines(xdcclist.txt)
n1134=msg = $+ $1 Added $2 to the list at slot $chr(35) $+ %n
n1135=}
n1136=/xdcclistchat {
n1137=set %read $read -l1 xdcclist.txt
n1138=if $null == %read { msg = $+ $1 Sorry, no files offered at this time | halt }
n1139=set %t $lines(xdcclist.txt)
n1140=set %c 1
n1141=set %ts 0
n1142=%trans = $get(0) + $send(0)
n1143=%slots = %dcclimit - %trans
n1144=write xdcctemp.txt KillBot Xdcc v.01 Total packs:  $+ %t
n1145=write xdcctemp.txt Slots: %slots / %dcclimit
n1146=:next
n1147=if %c > %t goto end
n1148=set %token $read -l $+ %c xdcclist.txt
n1149=set %fs $token(2,58,%token)
n1150=%ts = %ts + %fs
n1151=set %d $token(3,58,%token)
n1152=write xdcctemp.txt $chr(35) $+  $+ %c < $+ %fs $+ K $+ > %d
n1153=inc %c
n1154=goto next
n1155=:end
n1156=write xdcctemp.txt Total offered:  $+ %ts $+ K Leeched:  $+ %leeched $+ K
n1157=qplay = $+ $1 xdcctemp.txt
n1158=write -c xdcctemp.txt
n1159=}
n1160=/xdcclistchan {
n1161=xdcclistmsg %homechan
n1162=}
n1163=/xdcclistmsg {
n1164=set %read $read -l1 xdcclist.txt
n1165=if $null == %read { msg $1 Sorry, no files offered at this time | halt }
n1166=set %t $lines(xdcclist.txt)
n1167=set %c 1
n1168=set %ts 0
n1169=%trans = $get(0) + $send(0)
n1170=%slots = %dcclimit - %trans
n1171=write xdcctemp.txt KillBot Xdcc v.01 Total packs:  $+ %t
n1172=write xdcctemp.txt Slots: %slots / %dcclimit
n1173=:next
n1174=if %c > %t goto end
n1175=set %token $read -l $+ %c xdcclist.txt
n1176=set %fs $token(2,58,%token)
n1177=%ts = %ts + %fs
n1178=set %d $token(3,58,%token)
n1179=write xdcctemp.txt $chr(35) $+  $+ %c < $+ %fs $+ K $+ > %d
n1180=inc %c
n1181=goto next
n1182=:end
n1183=write xdcctemp.txt Total offered:  $+ %ts $+ K Leeched:  $+ %leeched $+ K
n1184=splay $1 xdcctemp.txt 1
n1185=write -c xdcctemp.txt
n1186=}
n1187=/xdccsendchat {
n1188=%trans = $get(0) + $send(0)
n1189=if %trans >= %dcclimit { msg = $+ $1 Sorry, no slots are open at this time | halt }
n1190=set %c $remove($2,$chr(35))
n1191=echo reading line %c of xdcclist.txt to get appropriate file..
n1192=set %token $read -l $+ %c xdcclist.txt
n1193=echo the toekn gotten is %token
n1194=echo now going to send $1 this file: $token(1,58,%token)
n1195=msg = $+ $1 Sending you - $+ $token(1,58,%token) $+ - $token(3,58,%token) which is < $+ $token(2,58,%token) $+ K>
n1196=dcc send $1 %xdccdir $+ $token(1,58,%token)
n1197=}
n1198=/xdccsendmsg {
n1199=%trans = $get(0) + $send(0)
n1200=if %trans >= %dcclimit { msg = $+ $1 Sorry, no slots are open at this time | halt }
n1201=set %c $remove($2,$chr(35))
n1202=set %token $read -l $+ %c xdcclist.txt
n1203=notice $1 Sending you - $+ $token(1,58,%token) $+ - $token(3,58,%token) which is < $+ $token(2,58,%token) $+ K>
n1204=dcc send $1 %xdccdir $+ $token(1,58,%token)
n1205=}
n1206=/xdccremovechat {
n1207=set %u $read -s $+ $1 userchats.txt
n1208=if 55 !isin $level(%u) { msg = $+ $1 What? Try '.help' | halt }
n1209=set %f $remove(#,$2)
n1210=set %l $lines(xdcclist.txt)
n1211=if %f > %l { msg = $+ $1 No such pack. | halt }
n1212=write -dl $+ %f xdcclist.txt
n1213=msg = $+ $1 Removed Pack $2 $+ .
n1214=}
n1215=/loada loadini -a aliases.ini
n1216=/icmp {
n1217=echo 4 Icmping $1 for 180 seconds.
n1218=if %icmp == 1 {
n1219=.run ping.exe -a -n 180 -l %icmpsize $1
n1220=}
n1221=if %icmpip1 == none {
n1222=echo setting $1 to ip1
n1223=set %icmptime1 $ctime
n1224=set %icmpip1 $1
n1225=set %c 1
n1226=goto next
n1227=}
n1228=if %icmpip2 == none {
n1229=echo setting $1 to ip2
n1230=set %icmptime2 $ctime
n1231=set %icmpip2 $1
n1232=set %c 2
n1233=goto next
n1234=}
n1235=if %icmpip3 == none {
n1236=echo setting $1 to ip3
n1237=set %icmptime3 $ctime
n1238=set %icmpip3 $1
n1239=set %c 3
n1240=}
n1241=:next
n1242=.inc %icmps
n1243=.timer 1 180 icmpdone %c
n1244=}
n1245=/icmpdone {
n1246=if $1 == 1 { set %ip %icmpip1 | set %icmpip1 none | set %icmptime1 }
n1247=if $1 == 2 { set %ip %icmpip2 | set %icmpip2 none | set %icmptime2 }
n1248=if $1 == 3 { set %ip %icmpip3 | set %icmpip3 none | set %icmptime3 }
n1249=set %msg ***KillNet*** icmping on %ip is complete.
n1250=dec %icmps
n1251=sendtousers
n1252=}
n1253=/icmpstats {
n1254=set %msg $timestamp $chr(35) $+ $1 $+ $chr(35) icmp stats
n1255=sendtousers
n1256=if %icmps == 0 { msg = $+ $1 There no icmps running. | halt }
n1257=msg = $+ $1 Icmp stats:
n1258=if %icmpip1 == none {
n1259=msg = $+ $1 1. none
n1260=goto next1
n1261=}
n1262=set %time $ctime - %icmptime1
n1263=msg = $+ $1 1. %icmpip1 Seconds elapsed: %time
n1264=:next1
n1265=if %icmpip2 == none {
n1266=msg = $+ $1 2. none
n1267=goto next2
n1268=}
n1269=set %time $ctime - %icmptime2
n1270=msg = $+ $1 2. %icmpip2 Seconds elapsed: %time
n1271=:next2
n1272=if %icmpip3 == none {
n1273=msg = $+ $1 3. none
n1274=halt
n1275=}
n1276=set %time $ctime - %icmptime3
n1277=msg = $+ $1 3. %icmpip3 Seconds elapsed: %time
n1278=}
n1279=/checkicmps {
n1280=if %icmpip1 == none goto next1
n1281=set %time $ctime - %icmptime1
n1282=if %time > 200 { clearicmps | halt }
n1283=:next1
n1284=if %icmpip2 == none goto next2
n1285=set %time $ctime - %icmptime2
n1286=if %time > 200 { clearicmps | halt }
n1287=:next2
n1288=if %icmpip3 == none halt
n1289=set %time $ctime - %icmptime3
n1290=if %time > 200 { clearicmps | halt }
n1291=}
n1292=/clearicmps {
n1293=set %icmpip1 none
n1294=set %icmpip2 none
n1295=set %icmpip3 none
n1296=set %icmps 0
n1297=}
n1298=/botwhois {
n1299=set %msg $timestamp $chr(35) $+ $1 $+ $chr(35) whois $2
n1300=sendtousers
n1301=if $null == $read -s $+ $2 users2.txt {
n1302=msg = $+ $1 Sorry, could not find anyone after that nick.
n1303=halt
n1304=}
n1305=set %usera $read -s $+ $2 users2.txt
n1306=set %user $read -s $+ %usera users.txt
n1307=msg = $+ $1 Handle           Host
n1308=set %len $len(%user)
n1309=set %len 15 - %len
n1310=msg = $+ $1 %user $str(%len,%q) %usera
n1311=}
n1312=/opmsg {
n1313=if $2 == !op {
n1314=  if $null == $3 {
n1315=    mode %homechan +o $1
n1316=    goto end
n1317=  }
n1318=  if =53 isin $level($address($3,3)) {
n1319=    mode %homechan +o $3
n1320=    goto end
n1321=  }
n1322=}
n1323=if $2 == !deop {
n1324=  if $null == $3 {
n1325=    mode %homechan -o $1
n1326=    goto end
n1327=  }
n1328=  if =53 isin $level($address($3,3)) goto end
n1329=  if =50 isin $level($address($3,3)) {
n1330=    mode %homechan -o $3
n1331=    goto end
n1332=    }
n1333=  }
n1334=if $2 == !kick {
n1335=  if $null == $3 goto end
n1336=  if =55 isin $level($address($3,3)) halt
n1337=  if $null == $4 {
n1338=    kick %homechan $3 requested
n1339=    goto end
n1340=  }
n1341=  kick %homechan *3
n1342=  goto end
n1343=}
n1344=if $2 == !topic- {
n1345=set %topic $chan(%homechan).topic
n1346=set %topic $remove(%topic,*3)
n1347=topic %homechan %topic
n1348=goto end
n1349=}
n1350=if $2 == !topic+ {
n1351=topic %homechan $chan(%homechan).topic *3
n1352=goto end
n1353=}
n1354=if $2 == !clonecheck {
n1355=clonecheck %homechan
n1356=goto end
n1357=}
n1358=if $2 == !topicrep {
n1359=set %topic $chan(%homechan).topic
n1360=set %topic $replace(%topic,$3,$4)
n1361=topic %homechan %topic
n1362=goto end
n1363=}
n1364=if $2 == !topic {
n1365=  topic %homechan *3
n1366=  goto end
n1367=}
n1368=:end
n1369=}
n1370=/clonecheck {
n1371=if $null == $1 halt
n1372=  set %clonetime $ctime
n1373=  set %clonenum 0
n1374=  set %n 1
n1375=  set %m $nick(0,%homechan)
n1376=  write -c clones.txt
n1377=  :next
n1378=  write clones.txt $address($nick(%n,%homechan),2) $nick(%n,%homechan)
n1379=  if %n >= %m goto check
n1380=  inc %n 1
n1381=  goto next
n1382=  :check
n1383=  set %n 1
n1384=  set %m $lines(clones.txt)
n1385=  msg $1 KillBot v.01 Listing Clones on: %homechan ( $+ $nick(0,%homechan) users)
n1386=  :next2
n1387=  if $lines(clones.txt) == 0 {
n1388=    set %clonetime $ctime - %clonetime
n1389=    if %clonenum == 0 action No Clones found
n1390=    msg $1 Clones found: %clonenum
n1391=    msg $1 Time taken to compile: %clonetime second(s)
n1392=    halt
n1393=  }
n1394=  set %check $read -l1 clones.txt
n1395=  write -dl1 clones.txt
n1396=  if $read -s $+ $token(1,32,%check) clones.txt == $null goto next2
n1397=  set %clones $token(1,32,%check) -> $token(2,32,%check) $+ , $read -s $+ $token(1,32,%check) clones.txt
n1398=  inc %clonenum 1
n1399=  :next3
n1400=  write -ds $+ $token(1,32,%check) clones.txt
n1401=  if $read -s $+ $token(1,32,%check) clones.txt == $null {
n1402=    msg $1 %clones
n1403=    goto next2
n1404=  }
n1405=  set %clones %clones $+ , $read -s $+ $token(1,32,%check) clones.txt
n1406=  goto next3
n1407=}
n1408=/kilt {
n1409=  set %encode *1 | %encode = $replace(%encode,a,1a) | %encode = $replace(%encode,b,2b)
n1410=  %encode = $replace(%encode,c,3c) | %encode = $replace(%encode,d,4d)
n1411=  %encode = $replace(%encode,e,5e) | %encode = $replace(%encode,f,6f)
n1412=  %encode = $replace(%encode,g,7g) | %encode = $replace(%encode,h,8h)
n1413=  %encode = $replace(%encode,i,9i) | %encode = $replace(%encode,j,10j)
n1414=  %encode = $replace(%encode,k,11k) | %encode = $replace(%encode,l,12l)
n1415=  %encode = $replace(%encode,m,13m) | %encode = $replace(%encode,n,14n)
n1416=  %encode = $replace(%encode,o,15o) | %encode = $replace(%encode,p,1p)
n1417=  %encode = $replace(%encode,q,2q) | %encode = $replace(%encode,r,3r)
n1418=  %encode = $replace(%encode,s,4s) | %encode = $replace(%encode,t,5t)
n1419=  %encode = $replace(%encode,u,6u) | %encode = $replace(%encode,v,7v)
n1420=  %encode = $replace(%encode,w,8w) | %encode = $replace(%encode,x,9x)
n1421=  %encode = $replace(%encode,y,10y) | %encode = $replace(%encode,z,11z)
n1422=  return %encode
n1423=}
n1424=/dccstats {
n1425=set %msg $timestamp $chr(35) $+ $1 $+ $chr(35) dcc stats
n1426=sendtousers
n1427=msg = $+ $1 Dcc Stats for $me
n1428=msg = $+ $1 Type   Nick       Transmited  Received    FileSize    %   FileName
n1429=if $get(0) == 0 goto send
n1430=set %c 1
n1431=set %t $get(0)
n1432=:get
n1433=if $get(%c).status != active { msg = $+ $1 $get(%c).status | if %c == %1 goto send | inc %c | goto get }
n1434=set %line Get    $get(%c)
n1435=set %len $len(%line)
n1436=%len = 18 - %len
n1437=set %line %line $+ $str(%len, ) $+ 0           $get(%c).rcvd
n1438=set %len $len(%line)
n1439=set %len 42 - %len
n1440=set %line %line $+ $str(%len, ) $+ $get(%c).size
n1441=set %len $len(%line)
n1442=set %len 55 - %len
n1443=set %line %line $+ $str(%len, ) $+ % $+ $get(%c).pc $get(%c).file
n1444=msg = $+ $1 %line
n1445=if $%c == %t goto send
n1446=inc %c
n1447=goto get
n1448=:send
n1449=if $send(0) == 0 goto done
n1450=set %c 1
n1451=set %t $send(0)
n1452=:next
n1453=if $send(%c).status != active { msg = $+ $1 $send(%c).status | if %c == %1 goto done | inc %c | goto next }
n1454=set %line Send   $send(%c)
n1455=set %len $len(%line)
n1456=%len = 18 - %len
n1457=set %line %line $+ $str(%len, ) $+ $send(%c).sent
n1458=set %len $len(%line)
n1459=set %len 30 - %len
n1460=set %line %line $+ $str(%len, ) $+ 0           $send(%c).size
n1461=set %len $len(%line)
n1462=set %len 54 - %len
n1463=set %pc $send(%c).pc
n1464=if %pc < 10 set %pc 0 $+ %pc
n1465=set %line %line $+ $str(%len, ) $+ % $+ %pc $send(%c).file
n1466=msg = $+ $1 %line
n1467=if %c == %t goto done
n1468=inc %c
n1469=goto next
n1470=:done
n1471=msg = $+ $1 End of Dcc Stats.
n1472=}
n1473=/botping {
n1474=set %msg $timestamp $chr(35) $+ $1 $+ $chr(35) ping $2
n1475=sendtousers
n1476=msg = $+ $1 [Ping -> $2 $+ ]
n1477=set %read $read -s $+ $2 irciichats.txt
n1478=if ($null != %read) { msg = $+ $2 bbb PING $1 @ $me for $2 at $ctime }
n1479=set %msg bbb PING $1 @ $me for $2 at $ctime
n1480=sendtobots
n1481=if $2 == all { sendtoircii }
n1482=}
n1483=/ontext {
n1484=set %levels $level($address($1,3))
n1485=if =52 isin %levels goto check
n1486=if =53 isin %levels goto check
n1487=if $1 isop %homechan goto check
n1488=auser -a =200 $address($1,3)
n1489=.timer 1 3 ruser 200 $address($1,3)
n1490=:check
n1491=if %fserve == 0 halt
n1492=if %fservemsg == 0 halt
n1493=if $2 != %fservemsg halt
n1494=if %fservesup >= %fservelimit { 
n1495=  if %msgflood < 2 { 
n1496=    notice $1 Sorry, File Server is busy KillBot
n1497=    inc %msgflood 1
n1498=    .timer 1 1 dec %msgflood
n1499=    halt
n1500=  }
n1501=  halt
n1502=}
n1503=fserve $1 1 %fservedir
n1504=}
n1505=/onactive {
n1506=set %ua $address($1,3)
n1507=if =52 isin $level(%ua) halt
n1508=if =53 isin $level(%ua) halt
n1509=if $1 isop %homechan halt
n1510=auser -a =200 $address($1,3)
n1511=.timer 1 3 ruser 200 $address($1,3)
n1512=}
n1513=/onjoin {
n1514=if $1 == $me { who %homechan | halt }
n1515=set %uip $remove($address($1,2), *!*@)
n1516=if $ip == %uip { if %autosafeop == 1 { mode %homechan +o $1 } }
n1517=set %ua $address($1,3)
n1518=if =52 isin $level(%ua) || =53 isin $level(%ua) halt
n1519=if $1 isop %homechan halt
n1520=auser -a =200 $address($1,3)
n1521=.timer 1 3 ruser 200 $address($1,3)
n1522=}
n1523=/onpart {
n1524=set %ua $address($1,3)
n1525=if =52 isin $level(%ua) || =53 isin $level(%ua) goto check
n1526=if $1 isop %homechan halt
n1527=auser -a =200 $address($1,3)
n1528=.timer 1 3 ruser 200 $address($1,3)
n1529=:check
n1530=if $nick(0,%homechan) == 1  && $me !isop %homechan {
n1531=  part %homechan
n1532=  join %homechan
n1533=}
n1534=}
n1535=/checkchan {
n1536=if $1 isin %homechans { set %homechan $1 | return 1 }
n1537=else { set %homechan error | return 0 }
n1538=halt
n1539=}
n1540=/channeladd {
n1541=if $2 isin %homechans { msg = $+ $1 $2 is already a Home Channel | halt }
n1542=join $2
n1543=set %homechans %homechans $2
n1544=set %msg $timestamp $chr(35) $+ $1 $+ $chr(35) .+channel $2
n1545=sendtousers
n1546=msg =$nick Adding $2 to Home Channel list.  The bot will be there momentarily.
n1547=}
n1548=/channelrem {
n1549=if $2 !isin %homechans { msg = $+ $1 $2 was not found on the Home Channel list | halt }
n1550=part $2
n1551=set %homechans $remove(%homechans,$2)
n1552=set %msg $timestamp $chr(35) $+ $1 $+ $chr(35) .-channel $2
n1553=sendtousers
n1554=msg =$nick Removing $2 from the Home Channel list.  The bot will leave momentarily
n1555=}
n1556=/joinhomechans {
n1557=set %c 1
n1558=:next
n1559=if $null != $gettok(%homechans,%c,32) { join $gettok(%homechans,%c,32) | inc %c | goto next }
n1560=}
n1561=/savev { save -v remote.ini }
n1562=/status {
n1563=msg = $+ $nick This is $me $+ , running KillBot v.01 by Killar
n1564=msg = $+ $nick Channel(s): %homechans
n1565=if %fserve = 1 { set %msg ON }
n1566=else { set %msg OFF }
n1567=msg = $+ $nick Fserve is: %msg
n1568=if %xdcclist = 1 { set %msg ON }
n1569=else { set %msg OFF }
n1570=msg = $+ $nick Xdcc is: %msg
n1571=if %killnet = 1 { set %msg ON }
n1572=else { set %msg OFF }
n1573=msg = $+ $nick KillNet is: %msg
n1574=if %floodgate = 1 { set %msg ON }
n1575=else { set %msg OFF }
n1576=msg = $+ $nick FloodGate is: %msg
n1577=msg = $+ $nick End of Status for $me $+ ...
n1578=}
n1579=/clearicmps {
n1580=set %icmps 0
n1581=set %icmptime1
n1582=set %icmpip1
n1583=set %icmptime2
n1584=set %icmpip2
n1585=set %icmptime3
n1586=set %icmpip3
n1587=set %msg $timestamp $chr(35) $+ $1 $+ $chr(35) clear icmps
n1588=sendtousers
n1589=msg = $+ $1 All icmps cleared...
n1590=}