eXtreme — File Browser

xtreme_s / xtreme_s / sys / dialog3.ini

dialog3.ini — 33.6 KB — Download this file

[script]
n0=;xxxxxxxxxxxxxxxxxxxxxxx
n1=; extreme v8.21
n2=; dialogs (3)
n3=;xxxxxxxxxxxxxxxxxxxxxxx
n4=;
n5=dialog prot {
n6=  title "Channel Protection Settings"
n7=  size -1 -1 230 150
n8=  icon graphics\prot.ico
n9=  option dbu
n10=  button "Ok", 250, 85 128 30 10, ok default
n11=  button "Cancel", 249, 120 128 30 10, cancel
n12=
n13=  menu "&Setup", 500
n14=  item "&general setup", 501
n15=  item "&display settings", 502
n16=  item break, 505
n17=  item "&network settings", 506
n18=  item break, 503
n19=  item "&userlist", 504
n20=  menu "&Advanced", 600
n21=  item "ban protection", 601
n22=  item "auto-rejoin to gain ops", 602
n23=  item break, 610
n24=  item "chanserv auto-unban", 603
n25=  item "chanserv auto-op on deop", 604
n26=  item break, 611
n27=  item "badnick instead of badhostmask", 606
n28=  item break, 612
n29=  item "'excess flood' kickban", 605
n30=  menu "&Help", 700
n31=  item "&help dialog", 701
n32=  item break, 702
n33=  item "&about extreme", 703
n34=
n35=  tab "Triggers", 241, 5 5 220 115
n36=  tab "Settings", 244
n37=  tab "Advertise", 243
n38=  tab "Badwords", 242
n39=  tab "Badchans", 246
n40=  tab "Badfiles", 247
n41=
n42=  list 1, 15 28 200 75, extsel hide tab 241
n43=  combo 6, 15 101 60 50, drop tab 241
n44=  button "add", 7, 80 103 17 8, tab 241
n45=  button "rem", 8, 97 103 17 8, tab 241
n46=  check "disable", 9, 194 101 20 8, push tab 241
n47=  button "edit", 10, 174 101 20 8, tab 241
n48=  box "", 2, 12 22 206 92, tab 241
n49=
n50=  text "Offense time", 205, 40 32 30 8, right tab 244
n51=  edit "", 206, 75 30 12 10, tab 244
n52=  text "Tempban time", 207, 32 42 38 8, right tab 244
n53=  edit "", 208, 75 40 12 10, tab 244
n54=  text "mins (time for all penalties to occur)", 209, 90 32 90 8, tab 244
n55=  text "mins (default time for tempban penalties)", 210, 90 42 100 8, tab 244
n56=  text "Default bantype", 211, 33 62 40 8, tab 244
n57=  combo 212, 75 60 90 80, drop tab 244
n58=  check "Exempt @ops", 217, 20 80 50 8, tab 244
n59=  check "Exempt +voices", 220, 20 89 50 8, tab 244
n60=  check "Exempt %halfops", 222, 20 98 60 8, tab 244
n61=  check "Exempt notify users", 221, 90 80 60 8, tab 244
n62=  check "Warn me on penalty", 218, 90 89 60 8, tab 244
n63=  check "Kickcounter", 107, 90 98 40 8, tab 244
n64=  check "Deop on serverop", 213, 160 80 55 8, tab 244
n65=  check "Kick-on-ban", 214, 160 89 40 8, tab 244
n66=  check "Slapkick", 219, 160 98 30 8, tab 244
n67=  box "Misc", 215, 15 25 200 85, tab 244
n68=  box "", 216, 15 50 200 25, tab 244
n69=
n70=  list 31, 105 45 50 60, sort vsbar tab 242
n71=  button "Add", 32, 65 60 25 10, tab 242
n72=  button "Remove", 33, 65 70 25 10, tab 242
n73=  edit "", 35, 105 35 50 10, autohs tab 242
n74=  box "Forbidden words", 36, 15 25 200 85, tab 242
n75=
n76=  list 331, 105 45 50 60, sort vsbar tab 246
n77=  button "Add", 332, 65 60 25 10, tab 246
n78=  button "Remove", 333, 65 70 25 10, tab 246
n79=  edit "", 335, 105 35 50 10, autohs tab 246
n80=  box "Forbidden keywords/channels", 336, 15 25 200 85, tab 246
n81=
n82=  list 91, 85 43 110 70, sort tab 243
n83=  button "Add", 92, 45 48 25 10, tab 243
n84=  button "Update", 97, 45 58 25 10, disable tab 243
n85=  button "Remove", 93, 45 68 25 10, disable tab 243
n86=  edit "", 95, 85 33 110 10, autohs tab 243
n87=  box "Forbidden masks", 96, 15 25 200 85, tab 243
n88=
n89=  list 341, 105 45 50 60, sort vsbar tab 247
n90=  button "Add", 342, 65 60 25 10, tab 247
n91=  button "Remove", 343, 65 70 25 10, tab 247
n92=  edit "", 345, 105 35 50 10, autohs tab 247
n93=  box "Forbidden files", 346, 15 25 200 85, tab 247
n94=
n95=  edit "", 300, 0 0 0 0, autohs
n96=}
n97=alias prots if ($1) _var loadchan $_chan($1) | _dialog -m prot prot
n98=alias -l _c if ($2 isnum) { var %c = $iif($did(300),$did(300),$did(6)) | if (%c == global) _-set prot $1- | elseif ($2 != $hget(x_prot,$1)) _-set $+(prot-,%c) $1- | else _-unset $+(prot-,%c) $1 }
n99=alias -l _cp if ($2 != <n/a>) { var %c = $iif($did(300),$did(300),$did(6)) | if (%c == global) _-set penalties $1- | elseif ($2 != $hget(x_penalties,$1)) _-set $+(prot-,%c) $+(pen.,$1) $2- | else _-unset $+(prot-,%c) $+(pen.,$1) }
n100=alias -l _ck if ($2 != <n/a>) { var %c = $iif($did(300),$did(300),$did(6)) | if (%c == global) { if ($2- != $_km(g,$1,&parm1,&parm2)) _-set kickmsgs $1 $2- | else _-unset kickmsgs $1 } | elseif ($2- != $_km(c,$1,&parm1,&parm2)) _-set $+(prot-,%c) $+(km.,$1) $2- | else _-unset $+(prot-,%c) $+(km.,$1) }
n101=alias -l _getchans var %n = 1, %s, %a | while ($hget(%n)) { %s = $ifmatch | if (x_prot-* iswm %s) && ($hget(%s,0).item > 0) %a = $addtok(%a,$gettok(%s,2-,45),44) | inc %n } | return %a
n102=alias -l _p if ($hget($+(x_prot-,$did(prot,6)),$+(pen.,$1))) return $ifmatch | return $hget(x_penalties,$1)
n103=alias -l _cod tokenize 32 $1- | if ($2 == flood) return $1 | if ($1 == excess) || ($1 == mass) || ($2 == idle) return $2 | if ($1 == bad) return $b($1-) | return $1
n104=alias -l _mgt return $remtok($gettok($gettok($1,$2,9),2-,32),*,32)
n105=alias -l _savechsets {
n106=  var %n = 2 | while (%n <= $did(1).lines) {
n107=    var %p = $gettok($gettok($did(1,%n),1,9),3-,32), %l = $_cod(%p), %s = $gettok($did(1,%n),1,32), %s = $iif(%s == +,1,$iif(%s == <n/a>,-,0)), %trig = $remove($_mgt($did(1,%n),2),events,per,line,in,secs,clones,-), %pen = $_mgt($did(1,%n),3), %t1 = $gettok(%trig,1,32), %t2 = $gettok(%trig,2,32), %km = $_mgt($did(1,%n),4)
n108=    if (%p ==  ) goto n | if (%s isnum) _c %l %s | if (%t1 isnum) _c %l $+ _max %t1 | if (%t2 isnum) _c %l $+ _time %t2 | _cp %l %pen | _ck %l %km | :n | inc %n
n109=  }
n110=  _c disable $iif($did(9).state,1,0)
n111=  hupd
n112=}
n113=alias -l loadlist {
n114=  did -ehr prot 1 | did -u prot 9
n115=  if ($cset($did(prot,6),disable)) { did -b prot 1 | did -c prot 9 }
n116=  var %t = lines flood.bytes flood.repeat flood.notice flood.nick flood.join flood.ctcp flood. .mass kick.mass deop.mass ban. .excess caps.excess colours.excess codes.excess chars.channel idle.clones. .bad word.bad hostmask.bad channel.bad files.advertise.pvtspam.guests.socks5. .flooder.secondban.masskick.masskaway.masskill.slaps, %n = 1, %c = $did(prot,6)
n117=  while (%n <= $numtok(%t,46)) {
n118=    var %p = $gettok(%t,%n,46), %l = $_cod(%p) | if (%p ==  ) { did -a prot 1   | goto n } | var %switch = $cset(%c,%l), %switch = $iif(%switch != 0,$iif(%switch == <n/a>,-,on),off), %max = $cset(%c,$+(%l,_max)), %time = $cset(%c,$+(%l,_time)), %pen = $_p(%l), %km = $_km(%c,%l,&parm1,&parm2)
n119=    if (mass isin %p) || (flood isin %p) var %trig = %max in %time secs | elseif (excess isin %p) var %trig = %max per line | elseif (%p == clones) var %trig = %max clones max | elseif (idle isin %p) var %trig = %max mins | else var %trig = <n/a>
n120=    if (%n > 27) var %switch = <n/a>, %trig = <n/a>, %pen = <n/a>
n121=    if (%c != global) {
n122=      if (%switch != <n/a>) && ((%switch == off) && ($hget(x_prot,%l)) || ((%switch == on) && ($hget(x_prot,%l) == 0))) var %switch = * %switch
n123=      if (%trig != <n/a>) && (%max != $hget(x_prot,$+(%l,_max))) || (%time != $hget(x_prot,$+(%l,_time))) var %trig = * %trig
n124=      if (%pen != <n/a>) && (%pen != $hget(x_penalties,%l)) var %pen = * %pen
n125=      if (%km != $_km(c,%l,&parm1,&parm2)) var %km = * %km
n126=    }
n127=    did -a prot 1 $iif(%switch == on,+,-) %p $+ $tab %trig $tab %pen $tab %km | :n | inc %n
n128=  }
n129=  did -ra prot 300 $did(prot,6) | did -v prot 1
n130=}
n131=on 1:dialog:prot:*:*:{
n132=  if ($devent == init) {
n133=    mdx.start
n134=    var %a = $mdx(SetControlMDX,1 listview checkboxes rowselect single flatsb showsel report nosortheader > [ $mdx.vdll ] )
n135=    did -i $dname 1 1 header @100,90,150,200 0 Protection $tab Trigger $tab Penalties $tab Kick Message
n136=    did -a prot 6 Global | didtok prot 6 44 $_getchans | did -c prot 6 1
n137=
n138=    var %t = 1 | while ($hget(x_advertise,%t)) { did -a prot 91 $ifmatch | inc %t }
n139=    if ($hget(x_prot,badword.list)) didtok prot 31 44 $ifmatch
n140=    if ($hget(x_prot,badchannel.list)) didtok prot 331 44 $ifmatch
n141=    if ($hget(x_prot,badfiles.list)) didtok prot 341 44 $ifmatch
n142=
n143=    if ($hget(x_prot,slapkick) != 0) did -c prot 219
n144=    if ($hget(x_prot,warnme)) did -c prot 218
n145=    if ($hget(x_prot,kickops) != 1) did -c prot 217
n146=    if ($hget(x_prot,kickvoices) != 1) did -c prot 220
n147=    if ($hget(x_prot,kickhalfops) != 1) did -c prot 222
n148=    if ($hget(x_prot,kicknotify) != 1) did -c prot 221
n149=    if ($hget(x_prot,nethack)) did -c prot 213
n150=    did -a prot 206 $hget(x_prot,offense_time)
n151=    did -a prot 208 $hget(x_prot,tempban)
n152=
n153=    var %n = 0 | did -a prot 212 nick!*@* | while (%n <= 9) { did -a prot 212 $mask(nick!ident@host.domain.net,%n) | inc %n }
n154=    did -a prot 212 $_mask(nick!ident@host.domain.net,20)
n155=    did -a prot 212 $_mask(nick!ident@host.domain.net,18)
n156=    if ($hget(x_prot,kickonban)) did -c prot 214
n157=
n158=    if ($hget(x_prot,defban) == 20) did -c prot 212 12
n159=    elseif ($hget(x_prot,defban) == 18) did -c prot 212 13
n160=    elseif ($hget(x_prot,defban) == 19) did -c prot 212 1
n161=    else did -c prot 212 $calc($hget(x_prot,defban) +2)
n162=
n163=    if ($hget(x_prot,nobanprotect) != 1) did -c prot 601
n164=    if ($hget(x_sets,rejoingainops)) did -c prot 602
n165=    if ($hget(x_sets,cs.autounban)) did -c prot 603
n166=    if ($hget(x_sets,cs.autoop)) did -c prot 604
n167=    if ($hget(x_prot,excessfloodban)) did -c prot 605
n168=    if ($hget(x_prot,only.badnick)) did -c prot 606
n169=    if ($hget(x_prot,nokickcounter) != 1) did -c prot 107
n170=    if ($hget(x_vars,loadchan)) {
n171=      var %c = $mkfn($ifmatch)
n172=      if ($istok($_getchans,%c,44) == $false) did -a prot 6 %c
n173=      if ($didwm(prot,6,%c)) did -c prot 6 $ifmatch
n174=      _--unset vars loadchan
n175=    }
n176=    .timer 1 0 loadlist
n177=  }
n178=  var %p = $gettok($gettok($did(1).seltext,1,9),3-,32), %l = $_cod(%p), %s = $gettok($did(1).seltext,1,32), %s = $iif(%s == +,1,$iif(%s == <n/a>,-,0)), %trig = $remove($_mgt($did(1).seltext,2),events,per,mins,line,in,secs,clones,max,-), %pen = $_mgt($did(1).seltext,3), %km = $_mgt($did(1).seltext,4)
n179=  if ($devent == menu) {
n180=    if ($did == 501) setup
n181=    if ($did == 502) display
n182=    if ($did == 504) ul
n183=    if ($did == 506) nets
n184=    if ($did == 701) help
n185=    if ($did == 703) about
n186=    if ($did isnum 601-606) did $iif($did($did).state,-u,-c) prot $did
n187=  }
n188=  if ($devent == dclick) && ($did == 1) && ($remove(%p, )) trig %p $+ ; $+ %s $+ ; $+ %trig $+ ; $+ %pen $+ ; $+ %km
n189=  if ($devent == sclick) {
n190=    if ($dialog(prot).tab == 243) { did -t prot 92 | did -f prot 95 }
n191=    elseif ($dialog(prot).tab == 242) { did -t prot 32 | did -f prot 35 }
n192=    elseif ($dialog(prot).tab == 246) { did -t prot 332 | did -f prot 335 }
n193=    elseif ($dialog(prot).tab == 247) { did -t prot 342 | did -f prot 345 }
n194=    else did -t prot 250
n195=    if ($did == 6) && ($did(300) != $did(6)) { _savechsets | loadlist }
n196=    if ($did == 7) { _savechsets | if ($inp(Enter new channel~Add channel,1)) { did -a prot 6 $_chan($mkfn($ifmatch)) | did -c prot 6 $did(6).lines | loadlist } }
n197=    if ($did == 8) && ($did(6) != global) && ($input(Delete settings for $did(6) $+ ?,8)) { _-unset $+(prot-,$did(6)) | did -d prot 6 $did(6).sel | did -c prot 6 $did(6).lines | loadlist }
n198=    if ($did == 9) did $iif($did(9).state,-b,-e) prot 1
n199=    if ($did == 10) && ($remove(%p, )) trig %p $+ ; $+ %s $+ ; $+ %trig $+ ; $+ %pen $+ ; $+ %km
n200=    if ($did == 32) && ($did(35)) && ($_isnotinlist($dname,31,$did(35))) { did -a prot 31 $did(35) | did -r prot 35 }
n201=    if ($did == 33) && ($did(31).seltext) { did -d prot 31 $did(31).sel | did -r prot 35 }
n202=    if ($did == 332) && ($did(335)) && ($_isnotinlist($dname,331,$did(335))) { did -a prot 331 $did(335) | did -r prot 335 }
n203=    if ($did == 333) && ($did(331).sel) { did -d prot 331 $did(331).sel | did -r prot 335 }
n204=    if ($did == 342) && ($did(345)) && ($_isnotinlist($dname,341,$did(345))) { did -a prot 341 $did(345) | did -r prot 345 }
n205=    if ($did == 343) && ($did(341).sel) { did -d prot 341 $did(341).sel | did -r prot 345 }
n206=    if ($did == 91) { did -e prot 93,97 | did -ra prot 95 $did(91).seltext }
n207=    if ($did == 92) && ($did(95)) && ($_isnotinlist($dname,91,$did(95))) { did -a prot 91 $did(95) | did -r prot 95 }
n208=    if ($did == 93) && ($did(91).sel) { did -d prot 91 $did(91).sel | did -r prot 95 }
n209=    if ($did == 97) && ($did(91).sel) && ($did(95)) && ($_isnotinlist($dname,91,$did(95))) { did -d prot 91 $did(91).sel | did -a prot 91 $did(95) | did -r prot 95 }
n210=    if ($did == 250) {
n211=      if ($did(601).state) _-unset prot nobanprotect | else _-set prot nobanprotect 1
n212=      if ($did(602).state)  _-set sets rejoingainops 1 | else _-set sets rejoingainops 0
n213=      if ($did(603).state) _-set sets cs.autounban 1 | else _-unset sets cs.autounban
n214=      if ($did(604).state) _-set sets cs.autoop 1 | else _-unset sets cs.autoop
n215=      if ($did(605).state) _-set prot excessfloodban 1 | else _-unset prot excessfloodban
n216=      if ($did(606).state) _-set prot only.badnick 1 | else _-unset prot only.badnick
n217=      if ($did(206) isnum) _-set prot offense_time $did(206)
n218=      if ($did(208) isnum) _-set prot tempban $did(208)
n219=      _-set prot nokickcounter $iif($did(107).state,0,1)
n220=      _-set prot warnme $iif($did(218).state,1,0)
n221=      _-set prot slapkick $iif($did(219).state,1,0)
n222=      _-set prot nethack $iif($did(213).state,1,0)
n223=      _-set prot kickonban $iif($did(214).state,1,0)
n224=      _-set prot kickops $iif($did(217).state,0,1)
n225=      _-set prot kickvoices $iif($did(220).state,0,1)
n226=      _-set prot kickhalfops $iif($did(222).state,0,1)
n227=      _-set prot kicknotify $iif($did(221).state,0,1)
n228=      if ($did(212).sel == 12) _-set prot defban 20
n229=      elseif ($did(212).sel == 13) _-set prot defban 18
n230=      elseif ($did(212).sel == 1) _-set prot defban 19
n231=      else _-set prot defban $calc($did(212).sel -2)
n232=      _-unset prot badword.list | if ($didtok(31,44)) _-set prot badword.list $ifmatch
n233=      _-unset prot badchannel.list | if ($didtok(331,44)) _-set prot badchannel.list $ifmatch
n234=      _-unset prot badfiles.list | if ($didtok(341,44)) _-set prot badfiles.list $ifmatch
n235=      _-unset advertise | var %i = 1 | while (%i <= $did(91).lines) { _-set advertise %i $strip($did(91,%i)) | inc %i }
n236=      _savechsets
n237=      if ($server) {
n238=        var %n = 1
n239=        while ($chan(%n)) { var %c = $ifmatch | _chanidle %c | inc %n }
n240=      }
n241=    }
n242=  }
n243=}
n244=;
n245=alias -l trig if ($dialog(trigger)) return | _--unset vars trig | if ($1) { _var trig $1- | dialog -mo trigger trigger }
n246=dialog trigger {
n247=  title "Configure protection"
n248=  size -1 -1 240 360
n249=  icon graphics\notes4.ico
n250=  check "Enable", 1, 20 35 60 15
n251=  box "", 9, 5 5 230 65
n252=  text "Trigger at", 10, 15 90 60 15, hide
n253=  text "events", 11, 115 90 50 15, hide
n254=  ;  edit "", 12, 65 86 45 22, hide
n255=  ;  edit "", 22, 163 86 40 22, hide
n256=  edit "", 12, 65 86 45 22, hide
n257=  edit "", 22, 163 86 40 22, hide
n258=  text "secs", 21, 205 90 50 15, hide
n259=  box "", 210, 5 65 230 55
n260=  list 101, 40 155 120 105, extsel
n261=  combo 102, 41 135 118 350, drop
n262=  button "add", 103, 170 140 30 15
n263=  button "up", 104, 170 175 30 15
n264=  button "rem", 105, 170 190 30 15
n265=  button "down", 106, 170 205 30 15
n266=  button "edit", 201, 170 235 30 15, disable
n267=  box "", 211, 5 115 230 145
n268=  box "", 212, 5 255 230 70
n269=  edit "", 107, 15 275 210 20, autohs
n270=  button "Default", 108, 169 300 55 15
n271=  text "No triggers for this event", 41, 25 90 190 15, disable hide center
n272=  text "No penalties for this event", 42, 25 185 190 15, disable hide center
n273=  button "Ok", 50, 70 340 45 17, ok default
n274=  button "Cancel", 49, 125 340 45 17, cancel
n275=  edit "", 40, 0 0 300 0, autohs hide
n276=}
n277=alias -l _updn var %c = $did(101).sel, %n = 1 | while (%n <= $did(101).lines) { did -o trigger 101 %n %n $+ . $gettok($did(101,%n),2-,32) | inc %n } | if (%c) did -c trigger 101 %c
n278=alias -l _custpenalty {
n279=  var %t = Here you can use normal identifiers, but should use &&nick, &&# and &&pen for the penalty related commands., %a = $perfd(0,penalty,%t,$replace($gettok($did(trigger,101).seltext,2-,58),·,$chr(44))), %e = . custom: $+ $replace(%a,$chr(44),·)
n280=  if (%a) {
n281=    if ($1) did -o trigger 101 $1 $1 $+ %e
n282=    else did -a trigger 101 $calc($did(trigger,101).lines +1) $+ %e
n283=  }
n284=}
n285=on 1:dialog:trigger:*:*:{
n286=  if ($hget(x_vars,trig)) { did -ra trigger 40 $ifmatch | _--unset vars trig }
n287=  var %name = $gettok($did(40),1,59), %sname = $_cod(%name), %s = $gettok($did(40),2,59), %trig = $gettok($did(40),3,59), %1 = $gettok(%trig,1,32), %2 = $gettok(%trig,2,32), %pen = $gettok($did(40),4,59), %km = $gettok($did(40),5-,59)
n288=  if ($devent == init) {
n289=    var %ev = $iif(%sname == idle,mins,$iif($right(%sname,1) == s,%sname,$+(%sname,s)))
n290=    did -ra trigger 12,22 0
n291=    if (%s == 1) did -c trigger 1
n292=    if (%trig == <n/a>) did -v trigger 41
n293=    elseif (%2) { did -ra trigger 11 %ev in | did -v trigger 10,11,12,21,22 | did -ra trigger 12 %1 | did -ra trigger 22 %2 }
n294=    elseif (%1) { did -ra trigger 11 %ev | did -v trigger 10,11,12 | did -ra trigger 12 %1 }
n295=    if (%pen == <n/a>) { did -b trigger 1 | dialog -t trigger Configure event | did -h trigger 101,102,103,104,105,106 | did -v trigger 42 }
n296=    else {
n297=      didtok trigger 102 46 warn_me.warn.warn(chan).deop.ban.tempban.kick.filterkick.filterkickban.clonekick.clonekickban.tempkickban.kickban.guestkickban.sitekickban.custom | did -c trigger 102 1
n298=      var %n = 1 | while (%n <= $numtok(%pen,44)) { did -a trigger 101 %n $+ . $gettok(%pen,%n,44) | inc %n }
n299=    }
n300=    did -ra trigger 9 $_firstup(%name) | did -ra trigger 107 %km
n301=  }
n302=  if ($devent == edit) && ($istok(12.22,$did,46)) && (($did($did) !isnum) || ($did($did) > 999)) did -ra trigger $did $left($did($did),-1)
n303=  if ($devent == dclick) && ($did == 101) && (custom: isin $did(101).seltext) _custpenalty $did(101).sel
n304=  if ($devent == sclick) {
n305=    if (custom: isin $did(101).seltext) did -e trigger 201 | else did -b trigger 201
n306=    if ($did == 103) { if ($did(102) == custom) _custpenalty | else did -a trigger 101 $calc($did(101).lines +1) $+ . $did(102) }
n307=    if ($did == 201) _custpenalty $did(101).sel
n308=    if ($did == 104) { _listup 101 | _updn }
n309=    if ($did == 105) && ($did(101).sel) && ($did(101).lines > 1) { did -d trigger 101 $did(101).sel | _updn }
n310=    if ($did == 106) { _listdown 101 | _updn }
n311=    if ($did == 108) did -ra trigger 107 $_km($iif($did(prot,6) == global,g,c),%sname,&parm1,&parm2)
n312=    if ($did == 50) {
n313=      var %n = 1, %pen, %t1, %t2, %t3, %trig, %s, %li = $did(prot,1).sel, %km = $did(107)
n314=      while (%n <= $did(101).lines) { %pen = $_addtok(%pen,$gettok($did(101,%n),2-,32),44) | inc %n }
n315=      if (!%pen) %pen = <n/a>
n316=      %t1 = $did(12) | %t2 = $did(22)
n317=      if (%t2) %trig = %t1 in %t2 secs
n318=      elseif (%t1) %trig = %t1 $iif(%name == clones,clones max,$iif(idle isin %name,mins,per line))
n319=      else %trig = <n/a>
n320=      %s = $iif($did(1).state,+,-)
n321=      did -o prot 1 %li %s 0 %name $+ 	0 %trig $+ 	0 %pen $+ 	0 %km
n322=      did -c prot 1 %li
n323=    }
n324=  }
n325=}
n326=;
n327=;kick dialog
n328=alias kickd _var kickstuff $1- | var %a = $_dialog(kickd,kickd,-4)
n329=dialog kickd {
n330=  title "Kick options"
n331=  size -1 -1 320 170
n332=  icon graphics\warning.ico
n333=  box "", 250, 10 40 80 90
n334=  box "", 249, 95 40 220 90
n335=  text "Reason", 1, 5 19 50 15
n336=  combo 2, 48 16 260 120, drop edit
n337=  radio "Kick", 3, 20 60 50 15, right
n338=  radio "KickBan", 4, 20 82 60 15, right
n339=  radio "Ban", 5, 20 104 50 15, right
n340=  combo 6, 110 57 190 240, drop
n341=  check "tempban", 9, 110 88 60 15, right
n342=  combo 10, 180 85 120 120, drop
n343=  button "Ok", 50, 100 143 55 20, OK default
n344=  button "Cancel", 51, 157 143 55 20, cancel
n345=  check "Filter", 11, 260 130 55 18, push
n346=  check "include tempban in kickmsg", 12, 110 108 150 15, right disable
n347=}
n348=alias -l _gbt if ($gettok($did(10),2,32) == min) return $calc($gettok($did(10),1,32) * 60) | else return $gettok($did(10),1,32)
n349=alias -l _resdids {
n350=  did -e kickd 2,3,4,5,6,9,10,12
n351=  if ($did(3).state) did -b kickd 6,9,10
n352=  if ($did(4).state) did -b kickd 10
n353=  if ($did(5).state) did -b kickd 2,10
n354=  if ($did(11).state) { if ($did(5).state) did -c kickd 4 | did -ub kickd 5,10 | did -e kickd 6 }
n355=  if ($did(9).state) did -e kickd 10,12 | else did -b kickd 12
n356=}
n357=on 1:dialog:kickd:*:*:{
n358=  tokenize 32 $hget(x_vars,kickstuff)
n359=  if ($devent == init) {
n360=    var %km = $read(sys\kicks.txt) | if (%km) did -a kickd 2 %km
n361=    var %dkm = $hget(x_misc,reckickmsgs) | if (%dkm) didtok kickd 2 164 $ifmatch
n362=    didtok kickd 2 46 not welcome.flood detected.badword detected.pub/spamming not allowed
n363=    did -c kickd $calc($1 +3) | _resdids
n364=    var %m = $_address($2,5), %db = $hget(x_prot,defban), %n = 0 | did -ra kickd 6 $2 $+ !*@* | while (%n <= 9) { did -a kickd 6 $mask(%m,%n) | inc %n } | did -a kickd 6 $_mask(%m,20) | did -a kickd 6 $_mask(%m,18)
n365=    if (%db == 20) did -c kickd 6 12 | elseif (%db == 18) did -c kickd 6 13 | elseif (%db == 19) did -c kickd 6 1 | else did -c kickd 6 $calc(%db +2)
n366=    didtok kickd 10 46 20 secs.60 secs.5 min.10 min.30 min | did -c kickd 10 2 | did -c kickd 2 1
n367=  }
n368=  if ($devent == sclick) {
n369=    _resdids
n370=    if ($did == 50) {
n371=      if ($did(2)) && ($did(2).sel != 1) && (!$istok(not welcome.flood detected.badword detected.pub/spamming not allowed,$did(2),46)) _set misc reckickmsgs $qtok($hget(x_misc,reckickmsgs),$did(2),5,164)
n372=      var %km = $iif($did(2),$did(2),$rkmsg) | if ($did(9).state) && ($did(12).state) %km = %km ...tempban for $gettok($did(10),1,32) $+  $+ $gettok($did(10),2,32)
n373=      if ($did(11).state) { if ($did(3).state) fk $3 $_address($2,2) %km | elseif ($did(4).state) fkb $3 $_address($2,2) %km }
n374=      elseif ($did(3).state) qkick $3 $2 %km
n375=      elseif ($did(4).state) { .raw MODE $3 $iif($2 isop $3,-o+b $2,+b) $did(6) | qkick $3 $2 %km }
n376=      elseif ($did(5).state) .raw MODE $3 $iif($2 isop $3,-o+b $2,+b) $did(6)
n377=      if ($did(9).state) .timer 1 $_gbt .raw MODE $3 -b $did(6)
n378=      _--unset vars kickstuff
n379=    }
n380=  }
n381=}
n382=;
n383=;host scans
n384=dialog match {
n385=  title "Host/Level Scan (all channels)"
n386=  size -1 -1 370 190
n387=  icon $mircexe, 6
n388=  list 1, 10 15 260 140, extsel
n389=  button "Query", 41, 290 40 55 20, ok
n390=  button "G.Kick", 42, 290 65 55 20, ok
n391=  button "G.Kickban", 43, 290 90 55 20, ok
n392=  button "Close", 50, 150 165 55 20, ok default
n393=  box "", 10, 5 5 360 155
n394=  text "", 20, 10 140 280 15
n395=}
n396=on 1:dialog:match:*:*:{
n397=  if ($devent == init) {
n398=    did -b $dname 41,42,43 | mdx.start
n399=    var %a = $mdx(SetControlMDX,1 listview rowselect single grid showsel headerdrag report nosortheader > [ $mdx.vdll ] )
n400=    did -i $dname 1 1 header @80,175 0 Nick $+ $chr(9) $+ 0 Address
n401=  }
n402=  if ($devent == sclick) {
n403=    var %n = $remove($gettok($did(1).seltext,3,32),$+($chr(9),0))
n404=    if ($did == 1) && ($did(1).seltext) && (%n != $me) { did -e $dname 41,42,43 | did -ra $dname 20 Common channels: $_comchans(%n) } | else { did -b $dname 41,42,43 | did -r $dname 20 }
n405=    if ($did == 41) query %n
n406=    if ($did == 42) _gk %n
n407=    if ($did == 43) _gkb %n
n408=  }
n409=}
n410=alias -l _gk gk $1- $inp(Reason?~Kicks)
n411=alias -l _gkb gkb $1- $inp(Reason?~Kicks)
n412=;
n413=;clones list
n414=dialog clonex {
n415=  title "Clone Scan"
n416=  size -1 -1 400 200
n417=  icon $mircexe, 6
n418=  list 1, 10 15 380 125, size extsel
n419=  button "Warn", 41, 110 145 55 20, ok
n420=  button "Kick", 42, 170 145 55 20, ok
n421=  button "Kickban", 43, 230 145 55 20, ok
n422=  check "all", 45, 360 140 50 15
n423=  button "Close", 50, 320 175 55 20, ok default
n424=  box "", 10, 5 5 390 165
n425=  button "clip", 44, 10 140 30 15
n426=}
n427=on 1:dialog:clonex:*:*:{
n428=  if ($devent == init) {
n429=    did -b $dname 41,42,43,44 | mdx.start
n430=    var %a = $mdx(SetControlMDX,1 listview rowselect single grid flatsb showsel headerdrag report nosortheader > [ $mdx.vdll ] )
n431=    did -i $dname 1 1 header @150,25,450 0 Mask $+ $chr(9) $+ 0 n# $+ $chr(9) $+ 0 Nicks
n432=  }
n433=  var %mt = %§.nets-clonetype
n434=  if ($devent == sclick) {
n435=    var %l = $did(1).seltext, %l = $remove(%l,$+($chr(9),0)), %a = $gettok(%l,3,32)
n436=    if ($did == 1) && ($did(1).sel) { if ($did(45).state == 0) did -e $dname 44 | if ($me isop $active) { did -e $dname 42,43 | if ($did(45).state == 0) did -e $dname 41 } } | else did -b $dname 41,42,43,44
n437=    if ($did == 45) { did $iif($did(45).state,-b,$iif($did(1).sel,-e,-b)) $dname 41,44 | did $iif($did(45).state,-e,$iif($did(1).sel,-e,-b)) $dname 42,43 }
n438=    if ($did == 41) { ale Clones have been warned ( $+ $ech(clonewarn,$active) $+ ) | fnotice $active %a $ech(clonewarn,$active) | did -d $dname 1 $did(1).sel | if (!$did(1,2)) dialog -k $dname }
n439=    if ($did == 42) { if ($did(45).state) { clones $active -k %mt | dialog -k $dname } | else { fk $active %a $_km($active,clones,$screw(%a)) | did -d $dname 1 $did(1).sel | if (!$did(1,2)) dialog -k $dname } }
n440=    if ($did == 43) { if ($did(45).state) { clones $active -kb %mt | dialog -k $dname } | else { fkb $active %a $_km($active,clones,$screw(%a)) | did -d $dname 1 $did(1).sel | if (!$did(1,2)) dialog -k $dname } }
n441=    if ($did == 44) clipboard $gettok(%l,3-,32)
n442=  }
n443=}
n444=
n445=;spambot
n446=alias sbotd _dialog -m sbotd sbotd
n447=dialog sbotd {
n448=  title "Spambot configuration"
n449=  size -1 -1 220 270
n450=  icon graphics\prot.ico
n451=  text "Nick", 1, 20 30 25 15
n452=  text "AltNick", 2, 20 50 35 15
n453=  text "User", 3, 20 70 35 15
n454=  text "Realname", 4, 20 90 50 15
n455=  text "Channels", 5, 20 120 50 15
n456=  text "Join on", 6, 20 170 50 15
n457=  edit "", 11, 80 27 120 20, autohs
n458=  edit "", 12, 80 47 120 20, autohs
n459=  edit "", 13, 80 67 120 20, autohs
n460=  edit "", 14, 80 87 120 20, autohs
n461=  combo 15, 80 116 120 80, drop
n462=  button "add", 16, 80 136 60 15
n463=  button "rem", 17, 140 136 60 15
n464=  combo 18, 80 166 120 80, drop
n465=  button "nickserv identify", 19, 10 200 100 15
n466=  button "perf. on connect", 20, 110 200 100 15
n467=  button "Ok", 50, 40 240 55 20, ok default
n468=  button "Cancel", 49, 120 240 55 20, cancel
n469=}
n470=on 1:dialog:sbotd:*:* {
n471=  if ($devent == init) {
n472=    if ($hget(x_spambot,nick)) did -ra sbotd 11 $ifmatch
n473=    if ($hget(x_spambot,altnick)) did -ra sbotd 12 $ifmatch
n474=    if ($hget(x_spambot,user)) did -ra sbotd 13 $ifmatch
n475=    if ($hget(x_spambot,realname)) did -ra sbotd 14 $ifmatch
n476=    didtok sbotd 15 44 $hget(x_spambot,chans)
n477=    did -c sbotd 15 1
n478=    didtok sbotd 18 44 when you join,when you get op
n479=    did -c sbotd 18 $iif($hget(x_spambot,event),1,2)
n480=  }
n481=  if ($devent == sclick) {
n482=    if ($did == 19) { var %pass = $inp(Enter nickserv pass for spambot~Spambot~?*) | _set spambot ns.pass $_pwd(%pass) }
n483=    if ($did == 20) _set spambot perform_on_connect $perfd(spambot,perform_on_connect)
n484=    if ($did == 16) { var %chan = $inp(Enter channel to add~Spambot,1) | did -a sbotd 15 $_chan(%chan) | did -c sbotd 15 $did(15).lines }
n485=    if ($did == 17) && ($did(15).sel) && ($input(Are you sure?,8)) { did -d sbotd 15 $did(15).sel | did -d sbotd 15 0 }
n486=    if ($did == 50) {
n487=      _set spambot nick $did(11)
n488=      _set spambot altnick $did(12)
n489=      _set spambot user $did(13)
n490=      _set spambot realname $did(14)
n491=      _set spambot chans $didtok(15,44)
n492=      _set spambot event $iif($did(18).sel == 1,1)
n493=    }
n494=  }
n495=}
n496=alias spambot {
n497=  if (!$sock(spambot)) { _identd | sockopen spambot $iif($gettok($hget(x_spambot,server),1,32),$ifmatch,$server) $iif($gettok($hget(x_spambot,server),2,32) isnum,$ifmatch,$port) | if ($1 ischan) _smark spambot 2 $1 | se (spambot) Connecting... }
n498=  elseif ($1 == kill) { _sw spambot QUIT :Leaving | .timer 1 2 sockclose spambot }
n499=  elseif ($1 == cycle) && ($2) { _sw spambot PART $2 | _sw spambot JOIN $2 }
n500=  elseif ($1 ischan) _sw spambot JOIN $1
n501=}
n502=alias spambot.acycle {
n503=  var %int = $hget(x_spambot,autocycle)
n504=  if (%int isnum) && ($sock(spambot)) .timerspambot.acycle 1 %int _spambot.acycle
n505=  else .timerspambot.acycle off
n506=}
n507=alias _spambot.acycle var %l = $_smark(spambot,3), %i = 1 | while (%i <= $numtok(%l,44)) { var %c = $gettok(%l,%i,44) | if (%c != 0) spambot cycle %c | inc %i } | .timer 1 1 spambot.acycle
n508=on 1:sockopen:spambot:{
n509=  if ($sockerr) { se (spambot) Couldn't connect | return }
n510=  var %nick = $iif($hget(x_spambot,nick),$ifmatch,$randnick), %pass = $iif($gettok($hget(x_spambot,server),3,32),$ifmatch,$server($server).pass)
n511=  if (%pass) _sw PASS $ifmatch
n512=  _sw NICK %nick $+ $crlf $+ USER $iif($hget(x_spambot,user),$ifmatch,$randnick) " $+ $iif($host,$host,localhost) $+ " " $+ $iif($ip,$ip,127.0.0.1) $+ " : $+ $iif($hget(x_spambot,realname),$ifmatch,$randnick)
n513=  _smark 1 %nick
n514=}
n515=on 1:sockclose:spambot:se (spambot) Connection closed
n516=on 1:sockread:spambot:{
n517=  if ($sockerr) return
n518=  var %sb
n519=  sockread %sb | if ($sockbr == 0) return
n520=  if (%debug) _wecho -> $sockname %sb
n521=  tokenize 32 %sb
n522=  if ($window(@spamlog)) aline @spamlog - %sb
n523=  var %me = $_smark(1), %nick = $right($gettok($1,1,33),-1), %address = $right($1,-1)
n524=  if ($2 isnum) {
n525=    if ($2 == 433) {
n526=      var %nme = $iif(($hget(x_spambot,altnick) && $hget(x_spambot,altnick) != %me),$ifmatch,%me $+ $rand(1,10))
n527=      _sw NICK %nme | _smark 1 %nme
n528=      se (spambot) %me is in use (changing to %nme $+ )
n529=    }
n530=    if ($2 == 366) {
n531=      if ($me !ison $4) || ((!$hget(x_spambot,event)) && ($me !isop $4)) .timerspambot.q.leave 1 10 _sw $sockname PART $4
n532=    }
n533=    if ($2 == 255) {
n534=      if ($hget(x_spambot,ns.pass)) _sw $sockname nickserv identify $_pwd($ifmatch)
n535=      if ($hget(x_spambot,perform_on_connect)) _perfd _sw $sockname $+ ­ $+ $ifmatch
n536=      if ($_smark(2)) _sw JOIN $ifmatch
n537=      _sw AWAY : $+ $iif($hget(x_spambot,awayreason),$ifmatch,working!! don't bother)
n538=    }
n539=    if (47* iswm $2) .timer 1 10 _sw $sockname JOIN $4
n540=  }
n541=  elseif ($1 == error) && (leaving !isin $gettok($1-,-1,32)) se (spambot) ERROR: $right($2-,-1)
n542=  elseif ($1 == ping) _sw PONG $2-
n543=  elseif ($2 == join) {
n544=    if (%nick == $me) .timerspambot.q.* off
n545=    if (%nick == %me) { .timerspambot.q.* off | _smark 3 $addtok($_smark(3),$right($3,-1),44) | _smark 2 0 }
n546=  }
n547=  elseif ($2 == part) && (%nick == %me) { 
n548=    if ($remtok($_smark(3),%ch,44)) _smark 3 $ifmatch
n549=    else { _smark 3 0 | .timerspambot.q.quit 1 10 spambot kill }
n550=  }
n551=  elseif (($2 == part) && (%nick == $me)) || (($2 == kick) && ($4 == $me)) {
n552=    var %ch = $iif(:* iswm $3,$right($3,-1),$3)
n553=    .timerspambot.q.leave 1 10 _sw $sockname PART %ch
n554=  }
n555=  elseif ($2 == quit) && (%nick == $me) .timerspambot.q.leave 1 10 spambot kill
n556=
n557=  if (%nick == $me) || ($3 != %me) || ($_smark(3) == 0) || ($comchan(%nick,0) == 0) || ($_isservice(%nick,%address)) return
n558=  if ($2 == privmsg) {
n559=    if ($_filter(.,spam,$right($4-,-1))) {
n560=      var %i = 1, %exempt = $_exempt(%address), %pen = 1 | while ($comchan(%nick,%i)) {
n561=        var %chan = $ifmatch
n562=        if ($me isop %chan) && (!%exempt) && ($cset(%chan,pvtspam)) && (!$_v%(noprotect.,%chan)) && (!$cset(%chan,disable)) && ($kickexempt(%nick,%chan)) {
n563=          penalty pvtspam %nick %chan $_km(%chan,pvtspam)
n564=          var %pen = 0
n565=        }
n566=        inc %i
n567=      }
n568=      ae $ech(pvtspam,%nick,%pen,$right($4-,-1))
n569=    }
n570=    if ($4-5 == :DCC SEND) && ($istok($hget(x_prot,badfiles.list),$6,44)) {
n571=      var %i = 1, %exempt = $_exempt(%address) | while ($comchan(%nick,%i)) {
n572=        var %chan = $ifmatch
n573=        if ($me isop %chan) && (!%exempt) && ($cset(%chan,badfiles)) && (!$_v%(noprotect.,%chan)) && (!$cset(%chan,disable)) && ($kickexempt(%nick,%chan)) penalty badfiles %nick %chan $_km(%chan,badfiles,$6)
n574=        inc %i
n575=      }
n576=    }
n577=  }
n578=  elseif ($2 == notice) && ($_filter(.,spam,$right($4-,-1))) {
n579=    var %i = 1, %exempt = $_exempt(%address), %pen = 1| while ($comchan(%nick,%i)) {
n580=      var %chan = $ifmatch
n581=      if ($me isop %chan) && (!%exempt) && ($cset(%chan,pvtspam)) && (!$_v%(noprotect.,%chan)) && (!$cset(%chan,disable)) && ($kickexempt(%nick,%chan)) {
n582=        penalty pvtspam %nick %chan $_km(%chan,pvtspam)
n583=        var %pen = 0
n584=      }
n585=      inc %i
n586=    }
n587=    ae $ech(pvtspam,%nick,$iif(%address,%address,n/a),%pen,$right($4-,-1))
n588=  }
n589=}
n590=;
n591=;EOF