alias traces { /dialog -md takd takd } dialog takd { title "Trace AKill Dialog" size -1 -1 317 225 option dbu edit "", 2, 59 14 111 10, autohs button "Trace", 3, 176 13 37 12 text "Search Criteria:", 4, 16 15 41 8 list 5, 15 39 84 113, group size extsel button "AKill", 6, 133 190 37 12, disable box "Search", 7, 6 5 304 155 box "With Selected...", 8, 6 163 304 46, disable edit "", 1, 52 173 50 10, disable autohs text "Expire after:", 9, 14 174 35 8, disable text "(e.g 1d)", 10, 106 175 25 8, disable edit "", 11, 178 174 123 10, disable autohs text "Reason:", 12, 152 175 23 8, disable button "Cancel", 13, 262 212 37 9, ok cancel list 14, 99 39 117 113, group size extsel text "Nickname:", 15, 16 30 25 8 list 16, 216 39 84 113, group size extsel vsbar text "Hostname:", 17, 101 30 27 8 text "Info:", 18, 220 30 15 8 button "Clear", 19, 263 29 35 9 edit "", 20, 28 212 140 10, read autohs text "Status:", 21, 6 213 20 8 check "After Akill, delete entry/entries from list", 22, 14 185 107 10, disable } ; INIT on *:dialog:takd:init:0:{ if (%akill.pref1) did -c $dname 22 } ; POPUP menu status,query,nicklist,channel { Trace AKill Dialog:/dialog -md takd takd } ; OPERSERV RESPONSE on *:notice:*:?:{ if ($nick == OperServ && $regex($1-,/Match: (.*) => .* (.*) on/) && $dialog(takd)) { tokenize 33 $regml(1) did -a takd 5 $1 did -a takd 14 $2 did -a takd 16 $remove($regml(2),$chr(40),$chr(41)) } } ; SEARCH CLICK on *:dialog:takd:sclick:3:{ if ($did(2)) { os trace print nick $did(2) did -ar $dname 20 Search $qt($did(2)) initiated. } else did -ar $dname 20 Search not intiated - Must enter search string! } ; CLEAR CLICK on *:dialog:takd:sclick:19:{ did -r $dname 5,14,16 did -b $dname 8-12,1,6,22 did -ar $dname 20 List Cleared. } ; ON LIST SELECT on *:dialog:takd:sclick:5,14,16:{ var %x = 1 while (%x <= $did($did,0).sel) { did -c $+ $iif($did($did,0).sel > 1,k) $dname $replace($remtok(5.14.16,$did,1,46),$chr(46),$chr(44)) $did($did,%x).sel inc %x } did -e $dname 8-12,1,6,22 } ; AKILL CLICK on *:dialog:takd:sclick:6:{ if ($did(1)) { var %x = $did(14,0).sel var %y = 1 while (%x > 0) { os akill add $+($iif($left($did(1),1) != +,+),$did(1)) $+(*@,$gettok($did(14,$did(14,%x).sel).text,$numtok($did(14,$did(14,%x).sel).text,64),64)) . $did(11) if ($did(22).state == 1) did -d $dname 5,14,16 $did(14,%x).sel dec %x inc %y } if ($did(22).state == 1) did -b $dname 8-12,1,6,22 did -ar $dname 20 $calc(%y - 1) users AKilled for reason: $iif($did(11),$ifmatch,~ None Specified ~) } else { did -ar $dname 20 User/s not AKilled. No expiry specified. } } ; DELETE NAMES AFTER? CLICK on *:dialog:takd:sclick:22:{ if ($did($did).state == 1) set %akill.pref1 $did($did).state else unset %akill.pref1 }