[script]
n0=alias setup { if ($dialog(setup) == $null) dialog -dm setup setup }
n1=dialog setup {
n2=  title "Dragon Bot V1.4 Setup          http://www.geocities.com/irc_dragonbot/"
n3=  size -1 -1 257 230
n4=  option dbu
n5=  tab "General Setup", 67, 5 5 247 200
n6=  tab "User Options", 68, 5 5 247 200
n7=  tab "Rules", 4, 5 5 247 200
n8=  tab "Help", 70, 5 5 247 200
n9=  ;  button "&Apply", 1, 125 215 37 11, ok default
n10=  button "D&efaults", 2, 85 215 37 11
n11=  button "&Ok", 3, 125 215 37 11, cancel
n12=  button "&Enable All", 5, 5 215 37 11
n13=  button "&Disable All", 6, 45 215 37 11
n14=  box "General Bot Setup", 7, 10 20 235 175, tab 67
n15=  box "User Options", 8, 10 20 235 175, tab 68
n16=  box "General Rules", 88, 10 20 235 175, tab 4
n17=
n18=  ;BOT SETUP TAB
n19=  text "AUTO CLOSE QUERY:", 9, 15 35 60 8, tab 67
n20=  text "Enabled", 10, 15 45 25 8, tab 67
n21=  text "Disabled", 11, 65 45 25 8, tab 67
n22=  radio  "", 12, 40 45 8 9, group, tab 67
n23=  radio  "", 13, 90 45 8 9, tab 67
n24=  text "USER TRACKING:", 14, 15 60 60 8, tab 67 
n25=  text "Enabled", 15, 15 70 25 8, tab 67           
n26=  text "Disabled", 16, 65 70 25 8, tab 67
n27=  radio  "", 17, 40 70 8 9,group, tab 67
n28=  radio  "", 18, 90 70 8 9, tab 67
n29=  text "JOIN COUNTER: ", 19, 15 85 60 8, tab 67    
n30=  text "Enabled", 20, 15 95 25 8, tab 67            
n31=  text "Disabled", 21, 65 95 25 8, tab 67
n32=  radio  "", 22, 40 95 8 9, group, tab 67
n33=  radio  "", 23, 90 95 8 9, tab 67
n34=  text "AUTO VOICE:",24, 15 110 60 8, tab 67
n35=  text "Enabled", 25, 15 120 25 8, tab 67
n36=  text "Disabled", 26, 65 120 25 8, tab 67
n37=  radio "", 27, 40 120 8 9, group, tab 67
n38=  radio "", 28, 90 120 8 9,  tab 67
n39=  text "Nick Case to Voice:" 29,  15 130 60 8, tab 67
n40=  text "Upper", 30, 15 140 25 8,group, tab 67
n41=  text "Lower", 31, 65 140 25 8, tab 67
n42=  radio "", 32, 40 140 8 9, group, tab 67
n43=  radio "", 33, 90 140 8 9, tab 67
n44=  text "REVOLVING DOOR:", 34, 15 155 60 8, tab 67   
n45=  text "Enabled", 35, 15 165 25 8, tab 67            
n46=  text "Disabled", 36, 65 165 25 8, tab 67
n47=  text "Temp Ban:", 37, 15 180 60 8, tab 67
n48=  text "seconds", 38, 65 180 60 8, tab 67
n49=  radio "", 39, 40 165 8 9, group, tab 67
n50=  radio "", 40, 90 165 8 9, tab 67
n51=  edit "120", 41, 45 180 17 11, tab 67
n52=  text "Home Channels:",84, 135 70 60 8, tab 67
n53=  combo 85, 135 80 60 70,sort, tab 67
n54=  button "Add",86, 200 95 37 10, tab 67
n55=  button "Remove",87, 200 115 37 10, tab 67
n56=  button "Edit", 111, 200 135 37 10, tab 67
n57=  check "Join Channels On Connect",89, 135 145 70 10, tab 67
n58=  text "Auto Greet:", 82, 135 157 50 10, tab 67
n59=  edit "", 92, 135 167 100 10, Autohs tab 67
n60=  check "Disable",93, 135 180 30 10, tab 67
n61=  check "Enforce Bans", 95, 135 35 50 10, tab 67
n62=  check "Protect bot from Bans", 96, 135 45 70 10, tab 67 
n63=  icon 112, 210 0 30 30, $mircdiricon27a1.ico 
n64=  text "DragonBot V1.4", 113, 160 0 50 10
n65=
n66=  ;USER CHANNEL OPTIONS TAB
n67=
n68=  text "GOR DICTIONARY:", 42, 15 35 60 8, tab 68
n69=  text "Enabled", 43, 15 45 25 8, tab 68
n70=  text "Disabled ", 44, 65 45 25 8, tab 68
n71=  radio "", 45, 40 45 8 9, group, tab 68
n72=  radio "", 46, 90 45 8 9, tab 68
n73=  text "GUEST BOOK:", 47, 15 60 60 8, tab 68
n74=  text "Enabled", 48, 15 70 25 8, tab 68
n75=  text "Disabled ", 49, 65 70 25 8, tab 68
n76=  radio "", 50, 40 70 8 9, group, tab 68
n77=  radio "", 51, 90 70 8 9, tab 68
n78=  text "MESSAGE BOARD:", 52, 15 85 50 8, tab 68
n79=  text "Enabled", 53, 15 95 25 8, tab 68
n80=  text "Disabled ", 54, 65 95 25 8, tab 68
n81=  radio "", 55, 40 95 8 9, group, tab 68
n82=  radio "", 56, 90 95 8 9, tab 68
n83=  text "BOT MAIL:", 57, 15 110 45 8, tab 68
n84=  text "Enabled", 58, 15 120 25 8, tab 68
n85=  text "Disabled ", 59, 65 120 25 8, tab 68
n86=  radio "", 60, 40 120 8 9, group, tab 68
n87=  radio "", 61, 90 120 8 9, tab 68
n88=  text "SEEN:", 62, 15 130 45 8, tab 68
n89=  text "Enabled", 63, 15 140 25 8, tab 68
n90=  text "Disabled ", 64, 65 140 25 8, tab 68
n91=  radio "", 65, 40 140 8 9, group, tab 68
n92=  radio "", 66, 90 140 8 9, tab 68
n93=  text "TAGLINES:", 72, 15 155 45 8, tab 68
n94=  text "Enabled", 73, 15 165 25 8, tab 68
n95=  text "Disabled ", 74, 65 165 25 8, tab 68
n96=  radio "", 75, 40 165 8 9, group, tab 68
n97=  radio "", 76, 90 165 8 9, tab 68
n98=  text "PERSONAL INFO:", 77, 145 35 45 8, tab 68
n99=  text "Enabled", 78, 145 45 25 8, tab 68
n100=  text "Disabled ", 79, 195 45 25 8, tab 68
n101=  radio "", 80, 170 45 8 9, group, tab 68
n102=  radio "", 81, 220 45 8 9, tab 68
n103=
n104=  ;RULES TAB
n105=  button "Edit Rule", 91, 60 179 40 10, tab 4
n106=  combo 83, 15 45 150 125, sort, tab 4
n107=  text "List Key Word", 101, 175 45 50 8, tab 4
n108=  edit "!rules", 102, 175 60 50 10, sort, tab 4
n109=  text "The key word is the word a user will send to the bot to access the rules list. To avoid accidental triggering of the command please ensure that it is prefixed by a ! or some other special character.",90,175 80 60 90, tab 4
n110=  button "General List", 103, 15 30 35 10, tab 4
n111=  button "List 1", 104, 55 30 35 10, tab 4
n112=  button "List 2 ", 105, 95 30 35 10, tab 4
n113=  button "Add Rule", 108, 15 179 40 10, tab 4
n114=  button "Remove Rule", 109, 105 179 40 10, tab 4
n115=  text "Created by nytetears69 - 2002", 69, 170 207 75 9, disable
n116=  ;  text "www.geocities.com/irc_dragonbot/", 110, 175 214 75 15, disable
n117=  ;HELP TAB
n118=  edit "", 71, 7 23 243 138, read return multi vsbar tab 70
n119=}
n120=
n121=
n122=alias -l update.setup {
n123=  did -r setup 85
n124=  set -u30 %st.temp.total $count($readini(stp.ini,n,botchannels,channel),$chr(44))
n125=  set -u30 %st.temp.count 0
n126=  :start
n127=  inc %st.temp.count 1
n128=  ;did -a adds the text to the combo box.
n129=  did -a setup 85 $gettok($readini(stp.ini,n,botchannels,channel),%st.temp.count,44)
n130=  if (%st.temp.count < %st.temp.total) { goto start }
n131=}
n132=alias -l rules.setup {
n133=  did -r setup 83
n134=  set -u30 %rl.temp.total  $count($readini(stp.ini,n,rules,rule.list $+ %spt.list),$chr(44))
n135=  set -u30 %rl.temp.count 0
n136=  :start
n137=  inc %rl.temp.count 1
n138=  ; did -a adds the text to the combo box.
n139=  did -a setup 83 $gettok($readini(stp.ini,n,rules,rule.list $+ %spt.list),%rl.temp.count,44)
n140=  ; did -a setup 83 $readini(stp.ini,n,rules,rule.list [ $+ [ %rl.temp.count ] ])
n141=
n142=  if (%rl.temp.count < %rl.temp.total) { goto start }
n143=}
n144=
n145=on *:dialog:setup:edit:*: {
n146=  if ($did == 41) { set %spt.sc.rd  $did(41).text | /writeini stp.ini bot.var spt.sc.rd %spt.sc.rd  | halt }
n147=  if ($did == 83) { set -u60 %setup.temp.rules $did(83).text  | halt }
n148=  if ($did == 85) { set -u60 %setup.temp.channel $did(85).text  | halt }
n149=  if ($did == 102) { set %setup.rule.word [ $+ [ %spt.list ] ] $did(102).text | /writeini stp.ini bot.var setup.rule.word %setup.rule.word [ $+ [ %spt.list ] ]  | halt }
n150=  if ($did == 92) { set %spt.bot.greet $did(92).text | /writeini stp.ini bot.var spt.bot.greet %spt.bot.greet | halt }
n151=}
n152=
n153=on *:dialog:setup:init:*:{
n154=  if ($readini(stp.ini,n,bot.var,spt.cs) == 1) { set %spt.cs 1 | did -c setup 12 | did -u setup 13 } 
n155=  if ($readini(stp.ini,n,bot.var,spt.cs) == 0) { set %spt.cs 0 | did -c setup 13 | did -u setup 12 }
n156=  if ($did(setup,12).state == 0 ) &&  ($did(setup,13).state == 0 ) { did -c setup 12 | .enable #close_pm  } 
n157=  if ($readini(stp.ini,n,bot.var,spt.tk) == 1) { set  %spt.tk  1 | did -c setup 17 | did -u setup 18 }  
n158=  if ($readini(stp.ini,n,bot.var,spt.tk) == 0) { set %spt.tk  0 | did -c setup 18 | did -u setup 17 }
n159=  if ($did(setup,17).state == 0 ) &&  ($did(setup,18).state == 0 ) { did -c setup 17 | .enable #watch } 
n160=  if ($readini(stp.ini,n,bot.var,spt.jn) == 1) { set %spt.jn  1 | did -c setup 22 | did -u setup 23 } 
n161=  if ($readini(stp.ini,n,bot.var,spt.jn) == 0) { set %spt.jn  0 | did -c setup 23 | did -u setup 22 }
n162=  if ($did(setup,22).state == 0 ) &&  ($did(setup,23).state == 0 ) { did -c setup 22 | .enable #joincount } 
n163=  if ($readini(stp.ini,n,bot.var,spt.vc) == 1) { set %spt.vc  1 | did -c setup 27 | did -u setup 28 }  
n164=  if ($readini(stp.ini,n,bot.var,spt.vc) == 0) { set %spt.vc  0 | did -c setup 28 | did -u setup 27 }
n165=  if ($did(setup,27).state == 0 ) &&  ($did(setup,28).state == 0 ) { did -c setup 27 | .enable #voice } 
n166=  if ($readini(stp.ini,n,bot.var,spt.cp.vc) == 0) { set %autovoice 2 | set %spt.cp.vc  0 | did -c setup 33 | did -u setup 32 }  
n167=  if ($readini(stp.ini,n,bot.var,spt.cp.vc) == 1) { set %autovoice 1 | set %spt.cp.vc  1 | did -c setup 32 | did -u setup 33 }
n168=  if ($did(setup,32).state == 0 ) &&  ($did(setup,33).state == 0 ) { did -c setup 33 | set %autovoice 2 }
n169=  if ($readini(stp.ini,n,bot.var,spt.rd) == 1) { set %spt.rd  1 | did -c setup 39 | did -u setup 40 |  did -e setup 41 } 
n170=  if ($readini(stp.ini,n,bot.var,spt.rd) == 0) { set %spt.rd  0 | did -c setup 40 | did -u setup 39 |  did -b setup 41 }
n171=  if ($did(setup,39).state == 0 ) &&  ($did(setup,40).state == 0 ) { did -c setup 39 | .enable #revolvekick } 
n172=  if ($readini(stp.ini,n,bot.var,spt.sc.rd) != $null ) { set %spt.sc.rd $readini(stp.ini,n,bot.var,spt.sc.rd) | did -r setup 41 | did -a setup 41 %spt.sc.rd }
n173=  if ($readini(stp.ini,n,bot.var,spt.sc.rd) == $null) { did -a setup 41 120 | set %spt.sc.rd 120 }
n174=  if ($readini(stp.ini,n,bot.var,spt.gd) == 1) { set %spt.gd  1 | did -c setup 45 | did -u setup 46 }
n175=  if ($readini(stp.ini,n,bot.var,spt.gd) == 0) { set %spt.gd 0 | did -c setup 46 | did -u setup 45 }
n176=  if ($did(setup,45).state == 0 ) &&  ($did(setup,46).state == 0 ) { did -c setup 45  | .enable #gor_dict }
n177=  if ($readini(stp.ini,n,bot.var,spt.gb) == 1) { set %spt.gb  1 | did -c setup 50 | did -u setup 51 }
n178=  if ($readini(stp.ini,n,bot.var,spt.gb) == 0) { set %spt.gb  0 | did -c setup 51 | did -u setup 50 }
n179=  if ($did(setup,51).state == 0 ) &&  ($did(setup,50).state == 0 ) { did -c setup 51 | .disable #guest  }
n180=  if ($readini(stp.ini,n,bot.var,spt.mb) == 1) { set %spt.mb  1 | did -c setup 55 | did -u setup 56 }
n181=  if ($readini(stp.ini,n,bot.var,spt.mb) == 0) { set %spt.mb  0 | did -c setup 56 | did -u setup 55 }
n182=  if ($did(setup,55).state == 0 ) &&  ($did(setup,56).state == 0) {  did -c setup 56 | .disable #message }
n183=  if ($readini(stp.ini,n,bot.var,spt.bm) == 1) { set %spt.bm 1 |  did -c setup 60 | did -u setup 61 }
n184=  if ($readini(stp.ini,n,bot.var,spt.bm) == 0) { set %spt.bm 0 |  did -c setup 61 | did -u setup 60 }
n185=  if ($did(setup,60).state == 0 ) &&  ($did(setup,61).state == 0) {  did -c setup 60 | .enable #note }
n186=  if ($readini(stp.ini,n,bot.var,spt.sn) == 1) { set %spt.sn 1 |  did -c setup 65 | did -u setup 66 }
n187=  if ($readini(stp.ini,n,bot.var,spt.sn) == 0) { set %spt.sn 0 |  did -c setup 66 | did -u setup 65 }
n188=  if ($did(setup,65).state == 0 ) &&  ($did(setup,66).state == 0) { did -c setup 65 | .enable #seen  }
n189=  if ($readini(stp.ini,n,bot.var,spt.tl) == 1) { set %spt.tl 1 |  did -c setup 75 | did -u setup 76 }
n190=  if ($readini(stp.ini,n,bot.var,spt.tl) == 0) { set %spt.tl 0 |  did -c setup 76 | did -u setup 75 }
n191=  if ($did(setup,75).state == 0 ) &&  ($did(setup,76).state == 0) { did -c setup 75 | .enable #tags }
n192=  if ($readini(stp.ini,n,bot.var,spt.pi) == 1) { set %spt.pi 1 |  did -c setup 80 | did -u setup 81 }
n193=  if ($readini(stp.ini,n,bot.var,spt.pi) == 0) { set %spt.pi 0 |  did -c setup 81 | did -u setup 80 }
n194=  if ($did(setup,80).state == 0 ) &&  ($did(setup,81).state == 0) { did -c setup 81  | .disable #personal }
n195=  if ($readini(stp.ini,n,botchannels,channe1) == $null) { did -b setup 89 }
n196=  if ($readini(stp.ini,n,botchannels,channel) != $null) { did -e setup 89 }
n197=  if ($readini(stp.ini,n,bot.var,spt.grt) == $null) { set %spt.grt off }
n198=  if ($readini(stp.ini,n,bot.var,spt.grt) == off) { set %spt.grt  off |  did -c setup 93 | did -b setup 92  }
n199=  if ($readini(stp.ini,n,bot.var,unban_self) == $null) { did -c setup 96 | set %unban_self 1 }
n200=  if ($readini(stp.ini,n,bot.var,unban_self) == 1) { set %unban_self 1 |  did -c setup 96  }
n201=  if ($readini(stp.ini,n,bot.var,enf_ban) == 1) { set %enf_ban 1 |  did -c setup 95 | .enable #ban }
n202=  if ($readini(stp.ini,n,bot.var,enf_ban) == 0) { set %enf_ban 0 |  did -u setup 95 | .disable #ban }
n203=  if ($readini(stp.ini,n,bot.var,enf_ban) == $null) { did -c setup 95 | .enable #ban | set %enf_ban 1 } 
n204=  if (%rules.list1 == $null) { set %rules.list1 I need to edit my rules list.  }
n205=  if ($readini(stp.ini,n,bot.var,setup.connect) == on) { set %setup.connect on | did -c setup 89 }
n206=  if ($readini(stp.ini,n,bot.var,setup.connect) == off) { set %setup.connect off | did -u setup 89 }
n207=  if ($readini(stp.ini,n,bot.var,spt.bot.greet) != $null) { set %spt.bot.greet $readini(stp.ini,n,bot.var,spt.bot.greet) |  did -a setup 92 $readini(stp.ini,n,bot.var,spt.bot.greet) }
n208=  did -b setup 102
n209=  set %spt.list 1
n210=  update.setup
n211=  rules.setup
n212=}
n213=on *:dialog:setup:sclick:*: {
n214=  if ($did == 12) { set %spt.cs 1 |  /writeini stp.ini bot.var spt.cs 1 | .enable #close_pm  | halt } 
n215=  if ($did == 13) { set %spt.cs 0 |  /writeini stp.ini bot.var spt.cs 0 | .disable #close_pm   | halt }
n216=  if ($did == 17) { set %spt.tk 1 |  /writeini stp.ini bot.var spt.tk 1  | .enable #watch  | halt } 
n217=  if ($did == 18) { set %spt.tk 0 |  /writeini stp.ini bot.var spt.tk 0 | .disable #watch  | halt }
n218=  if ($did == 22) { set %spt.jn 1 |  /writeini stp.ini bot.var spt.jn 1 | .enable #joincount  | halt } 
n219=  if ($did == 23) { set %spt.jn 0 |  /writeini stp.ini bot.var spt.jn 0 | .disable #joincount  | halt }
n220=  if ($did == 27) { set %spt.vc 1 |  /writeini stp.ini bot.var spt.vc 1 | .enable #voice  | halt } 
n221=  if ($did == 28) { set %spt.vc 0 |  /writeini stp.ini bot.var spt.vc 0 | .disable #voice  | halt }
n222=  if ($did == 32) { set %spt.cp.vc 1 | set %autovoice 1 | /writeini stp.ini bot.var spt.cp.vc 1 | halt }
n223=  if ($did == 33) { set %spt.cp.vc 0 | set %autovoice 2 | /writeini stp.ini bot.var spt.cp.vc 0 | halt }
n224=  if ($did == 39) { set %spt.rd 1 | .enable #revolvekick | /writeini stp.ini bot.var spt.rd 1 | did -e setup 41 | halt }  
n225=  if ($did == 40) { set %spt.rd 0 | .disable #revolvekick | /writeini stp.ini bot.var spt.rd 0 | did -b setup 41 | halt }
n226=  if ($did == 45) { set %spt.gd 1 | .enable #gor_dict  | /writeini stp.ini bot.var spt.gd 1 | halt } 
n227=  if ($did == 46) { set %spt.gd 0 | .disable #gor_dict | /writeini stp.ini bot.var spt.gd 0 | halt }
n228=  if ($did == 50) { set %spt.gb 1 | .enable #guest | /writeini stp.ini bot.var spt.gb 1 | halt }  
n229=  if ($did == 51) { set %spt.gb 0 | .disable #guest | /writeini stp.ini bot.var spt.gb 0 | halt }
n230=  if ($did == 55) { set %spt.mb 1 | .enable #message | /writeini stp.ini bot.var spt.mb 1 | halt } 
n231=  if ($did == 56) { set %spt.mb 0 | .disable #message | /writeini stp.ini bot.var spt.mb 0 | halt } 
n232=  if ($did == 60) { set %spt.bm 1 | .enable #note  | /writeini stp.ini bot.var spt.bm 1 | halt } 
n233=  if ($did == 61) { set %spt.bm 0 | .disable #note  | /writeini stp.ini bot.var spt.bm 0 | halt } 
n234=  if ($did == 65) { set %spt.sn 1 | .enable #seen | /writeini stp.ini bot.var spt.sn 1 | halt }  
n235=  if ($did == 66) { set %spt.sn 0 | .disable #seen  | /writeini stp.ini bot.var spt.sn 0 | halt } 
n236=  if ($did == 75) { set %spt.tl 1 | .enable #tags | /writeini stp.ini bot.var 75 spt.tl 1 | halt }  
n237=  if ($did == 76) { set %spt.tl 0 | .disable #tags  | /writeini stp.ini bot.var 76 spt.tl 0 | halt }  
n238=  if ($did == 80) { set %spt.pi 1 | .enable #personal  | /writeini stp.ini bot.var 80 spt.pi 1 | halt }  
n239=  if ($did == 81) { set %spt.pi 0 | .disable #personal  | /writeini stp.ini bot.var 81 spt.gb 0 | halt }  
n240=  if ($did == 70) { /loadbuf  -o setup 71 scripts/bot_help.txt }
n241=
n242=  if ($did == 2 ) {
n243=    did -c setup 12,17,22,27,33,39,45,51,56,60,65,75,81,95,96,93 
n244=    did -u setup 13,18,23,28,32,40,46,50,55,61,66,76,80,89
n245=    did -r setup 41,92
n246=    did -b setup 92
n247=    unset %spt.bot.greet | /remini stp.ini bot.var spt.bot.greet
n248=    set %spt.grt off | /writeini stp.ini bot.var spt.grt off
n249=    unset %rules.list* 
n250=    unset %setup.list  | update.setup 
n251=    set %spt.list 1 | did -r setup 102 | did -a setup 102 !rules| did -b setup 102 | did -a setup 88 General Rules | rules.setup 
n252=    set %spt.cs 1 | .enable #close_pm | /writeini stp.ini bot.var spt.cs 1
n253=    set %spt.tk 1 | .enable #watch | /writeini stp.ini bot.var spt.tk 1
n254=    set %spt.jn 1 | .enable #joincount | /writeini stp.ini bot.var spt.jn 1 
n255=    set %spt.vc 1 | .enable #voice | /writeini stp.ini bot.var spt.vc 1
n256=    set %spt.rd 1 | .enable #revolvekick | /writeini stp.ini bot.var spt.rd 1 
n257=    set %spt.gd 1 | .enable #gor_dict | /writeini stp.ini bot.var spt.gd 1
n258=    set %spt.gb 0 | .disable #guest | /writeini stp.ini bot.var spt.gb  0
n259=    set %spt.mb 0 | .disable #message | /writeini stp.ini bot.var spt.mb 0
n260=    set %spt.bm 1 | .enable #note | /writeini stp.ini bot.var spt.bm 1
n261=    set %spt.sn 1 | .enable #seen | /writeini stp.ini bot.var spt.sn 1
n262=    set %spt.tl 1 | .enable #tags | /writeini stp.ini bot.var spt.tl 1
n263=    set %spt.pi 0 | .disable #personal | /writeini stp.ini bot.var spt.pi 0  
n264=    set %enf_ban 1 | .enable #ban | /writeini stp.ini bot.var enf_ban 1
n265=    set %unban_self 1 | /writeini stp.ini bot.var unban_self 1
n266=    set %spt.cp.vc 0 | /writeini stp.ini bot.var spt.cp.vc 0
n267=    set %setup.connect off  | /writeini stp.ini bot.var setup.connect off
n268=    set %spt.sc.rd 120 | did -a setup 41 120 | /writeini stp.ini bot.var spt.sc.rd 120
n269=  halt }
n270=  if ($did == 5 ) {
n271=    did -c setup 12,17,22,27,32,39,45,50,55,60,65,75,80,95,96 
n272=    did -u setup 13,18,23,28,33,40,46,51,56,61,66,76,81 
n273=    set %spt.cs 1 | .enable #close_pm | /writeini stp.ini bot.var spt.cs 1
n274=    set %spt.tk 1 | .enable #watch | /writeini stp.ini bot.var spt.tk 1
n275=    set %spt.jn 1 | .enable #joincount | /writeini stp.ini bot.var spt.jn 1 
n276=    set %spt.vc 1 | .enable #voice | /writeini stp.ini bot.var spt.vc 1
n277=    set %spt.rd 1 | .enable #revolvekick | /writeini stp.ini bot.var spt.rd 1 
n278=    set %spt.gd 1 | .enable #gor_dict | /writeini stp.ini bot.var spt.gd 1
n279=    set %spt.gb 1 | .enable #guest | /writeini stp.ini bot.var spt.gb 1
n280=    set %spt.mb 1 | .enable #message | /writeini stp.ini bot.var spt.mb 1
n281=    set %spt.bm 1 | .enable #note | /writeini stp.ini bot.var spt.bm 1
n282=    set %spt.sn 1 | .enable #seen  | /writeini stp.ini bot.var spt.sn 1  
n283=    set %spt.tl 1 | .enable #tags  | /writeini stp.ini bot.var spt.tl 1
n284=    set %spt.pi 1 | .enable #personal | /writeini stp.ini bot.var spt.pi 1 
n285=    set %enf_ban 1 | .enable #ban | /writeini stp.ini bot.var enf_ban 1
n286=    set %spt.cp.vc 1 | /writeini stp.ini bot.var spt.cp.vc 1 
n287=    set %unban_self 1 | /writeini stp.ini bot.var unban_self 1
n288=    did -r setup 41
n289=    set %spt.sc.rd 120 | did -a setup 41 120 | /writeini stp.ini bot.var spt.sc.rd 120
n290=  halt }
n291=  if ($did == 6 ) {
n292=    did -u setup 12,17,22,27,32,39,45,50,55,60,65,75,80,89,95,96
n293=    did -c setup 13,18,23,28,33,40,46,51,56,61,66,76,81,93
n294=    did -b setup 92
n295=    set %spt.cs 0 | .disable #close_pm  | /writeini stp.ini bot.var spt.cs 0
n296=    set %spt.tk 0 | .disable #watch | /writeini stp.ini bot.var spt.tk 0
n297=    set %spt.jn 0 | .disable #joincount | /writeini stp.ini bot.var spt.jn 0
n298=    set %spt.vc 0 | .disable #voice | /writeini stp.ini bot.var spt.vc 0
n299=    set %spt.rd 0 | .disable #revolvekick | /writeini stp.ini bot.var spt.rd 0  
n300=    set %spt.gd 0 | .disable #gor_dict | /writeini stp.ini bot.var spt.gd 0 
n301=    set %spt.gb 0 | .disable #guest | /writeini stp.ini bot.var spt.gb 0
n302=    set %spt.mb 0 | .disable #message | /writeini stp.ini bot.var spt.mb 0
n303=    set %spt.bm 0 | .disable #note | /writeini stp.ini bot.var spt.bm 0
n304=    set %spt.sn 0 | .disable #seen | /writeini stp.ini bot.var spt.sn 0
n305=    set %spt.tl 0 | .disable #tags   | /writeini stp.ini bot.var spt.tl 0 
n306=    set %spt.pi 0 | .disable #personal | /writeini stp.ini bot.var spt.pi 0  
n307=    set %enf_ban 0 | .disable #ban   | /writeini stp.ini bot.var enf_ban  0
n308=    set %spt.cp.vc 0 | /writeini stp.ini bot.var spt.cp.vc 0
n309=    set %unban_self 0   | /writeini stp.ini bot.var unban_self 0
n310=    set %spt.grt off  | /writeini stp.ini bot.var spt.grt off
n311=    set %setup.connect off  | /writeini stp.ini bot.var setup.connect off
n312=    did -r setup 41
n313=    set %spt.sc.rd 120 | did -a setup 41 120  | /writeini stp.ini bot.var spt.sc.rd 120
n314=  halt }
n315=
n316=  if ($did == 83) {
n317=    set -u30 %setup.rules.selected $did($dname,83,$did(83).sel)
n318=    halt
n319=  }
n320=  if ($did == 85) {
n321=    set -u30 %setup.channel.selected $did($dname,85,$did(85).sel)
n322=    halt
n323=  }
n324=  if ($did == 86) {
n325=    /writeini stp.ini botchannels channel $addtok($readini(stp.ini,n,botchannels,channel),%setup.temp.channel $+ $chr(44),44)
n326=    update.setup
n327=    if ($readini(stp.ini,n,botchannels,channel) != $null) { did -e setup 89 }
n328=    halt
n329=  }
n330=  if ($did == 87) {
n331=    set -u10  %setup.tc %setup.channel.selected $+ $chr(44)
n332=    if ($count($readini(stp.ini,n,botchannels,channel),$chr(44)) == 1) {  /remini stp.ini botchannels |  update.setup | halt }
n333=    /writeini stp.ini botchannels channel $remove($readini(stp.ini,n,botchannels,channel),%setup.tc )
n334=    if ($readini(stp.ini,n,botchannels,channel) == $null) { did -b setup 89 } 
n335=    update.setup
n336=    halt
n337=  }
n338=
n339=  if ($did == 89) {
n340=    if (%setup.connect == on) { set %setup.connect off |  /writeini stp.ini bot.var setup.connect off | halt }
n341=    if (%setup.connect == off) { set %setup.connect on |  /writeini stp.ini bot.var setup.connect on | halt }
n342=    if (%setup.connect == $null) { set %setup.connect on | /writeini stp.ini bot.var setup.connect on | halt }
n343=  }
n344=  if ($did == 91) {
n345=    if ($did(83) == $null) { halt }
n346=    set -u10 %tc.rules  %setup.temp.rules $+ ,
n347=    /writeini stp.ini rules rule.list [ $+ [ %spt.list ] ]  $replace($readini(stp.ini,n,rules,rule.list $+ %spt.list),%setup.rules.selected,%setup.temp.rules)
n348=    rules.setup
n349=    halt
n350=  }
n351=  if ($did == 111) {
n352=    if ($did(85) == $null) { halt }
n353=    /writeini stp.ini botchannels channel  $replace($readini(stp.ini,n,botchannels,channel),%setup.channel.selected,%setup.temp.channel)
n354=    update.setup
n355=    halt
n356=  }
n357=  if ($did == 93) {
n358=    if (%spt.grt == $null) { set %spt.grt  off | /writeini stp.ini bot.var spt.grt off | did -b setup 92 | halt }
n359=    if (%spt.grt == on) { set %spt.grt  off | /writeini stp.ini bot.var spt.grt off | did -b setup 92  | halt }
n360=    if (%spt.grt == off) { set %spt.grt  on | /writeini stp.ini bot.var spt.grt on |  did -e setup 92 | halt }
n361=  }
n362=  if ($did == 95) {
n363=    if (%enf_ban == 1) { set %enf_ban 0 | /writeini stp.ini bot.var enf_ban 0 | .disable #ban | halt }
n364=    if (%enf_ban == 0) { set %enf_ban 1 | /writeini stp.ini bot.var enf_ban 1 | .enable #ban | halt }
n365=    if (%enf_ban == $null) { set %enf_ban 1  | /writeini stp.ini bot.var enf_ban 1 | .enable #ban | halt }
n366=  }
n367=  if ($did == 96) {
n368=    if (%unban_self == 1) { set %unban_self 0 | /writeini stp.ini bot.var unban_self 0 | halt }
n369=    if (%unban_self == 0) { set %unban_self 1 | /writeini stp.ini bot.var unban_self 1 | halt }
n370=    if (%unban_self == $null) { set %unban_self 1  | /writeini stp.ini bot.var unban_self 1 | halt }
n371=  }
n372=  if ($did == 103) { 
n373=    set %spt.list 1 
n374=    did -r setup 102
n375=    did -a setup 102 !rules
n376=    did -b setup 102 
n377=    did -a setup 88 General Rules 
n378=    rules.setup 
n379=  halt } 
n380=  if ($did == 104) { 
n381=    set %spt.list 2 
n382=    did -e setup 102 
n383=    did -r setup 102 
n384=    did -a setup 88 List 1 Rules 
n385=    rules.setup 
n386=    if (%setup.rule.word [ $+ [ %spt.list ] ]  == $null) { set %setup.rule.word [ $+ [ %spt.list ] ] !slave }
n387=    did -a  setup 102 %setup.rule.word [ $+ [ %spt.list ] ]   
n388=  halt } 
n389=  if ($did == 105) { set %spt.list 3 
n390=    did -e setup 102 
n391=    did -r setup 102 
n392=    did -a setup 88 List 2 Rules 
n393=    rules.setup 
n394=    if (%setup.rule.word [ $+ [ %spt.list ] ]  == $null) { set %setup.rule.word [ $+ [ %spt.list ] ] !Master }
n395=    did -a setup 102 %setup.rule.word [ $+ [ %spt.list ] ]
n396=  halt } 
n397=
n398=  if ($did == 108) {
n399=    set -u10 %tc.rules  %setup.temp.rules $+ ,
n400=    /writeini stp.ini rules rule.list [ $+ [ %spt.list ] ]  $addtok($readini(stp.ini,n,rules,rule.list [ $+ [ %spt.list ] ]),%tc.rules,44)
n401=    rules.setup
n402=    halt
n403=  }
n404=  if ($did == 109) {
n405=    set -u3  %rules.tc %setup.rules.selected $+ ,
n406=    if ($count($readini(stp.ini,n,rules,rule.list $+ %spt.list),$chr(44)) == 1) {  /remini stp.ini rules rule.list $+ %spt.list |  rules.setup | halt }
n407=    /writeini stp.ini rules rule.list $+ %spt.list $remove($readini(stp.ini,n,rules,rule.list $+ %spt.list),%rules.tc )
n408=    rules.setup
n409=    halt
n410=  }
n411=
n412=}
n413=ctcp &*:VERSION:*: .ctcpreply $nick VERSION DragonBot V1.4 from http://www.geocities.com/irc_dragonbot/ | /halt
n414=
n415=
n416=on +1:JOIN:#: { 
n417=  if ($nick == $me) { halt }
n418=  if (%spt.grt == off) { halt }
n419=  msg $nick $eval(%spt.bot.greet,2)
n420=  /auser -a 2  $address($nick,3) 
n421=  halt
n422=}
n423=}
