alias tracert {
if (!$dialog(tracert)) && ($1 != $null) { .set %tracedata $1 | dialog -mn tracert tracert }
elseif (!$dialog(tracert)) { dialog -mn tracert tracert }
}
dialog tracert {
title "Trace Route"
icon $mircdirsystem\domin.icl, 21
size -1 -1 189 224
option dbu
box "User or Host or IP", 1, 10 11 170 38
edit "", 2, 17 29 156 11, autohs
box "", 3, 10 57 170 136
edit "", 4, 17 68 156 119, autohs autovs multi
button "Trace", 5, 97 203 35 14
button "Close", 6, 145 203 35 14, cancel
}
on *:dialog:tracert:init:0:{
did -r $dname 4
did -m $dname 4
did -b $dname 5
if (($dialog(hostscan)) || ($dialog(chanscan)) || ($dialog(nickscan)) || ($dialog(clonescan)) || ($dialog(operscan)) || (%tracedata != $null)) { did -ra $dname 2 %tracedata | did -e $dname 5 }
}
on *:dialog:tracert:edit:2:{
if ($did($did).text == $null) { did -b $dname 5 }
else { did -e $dname 5 }
}
on *:dialog:tracert:sclick:*:{
if ($did = 5) {
did -r $dname 4
did -b $dname 5,6
set %tracedata $did(2)
did -a $dname 4 Tracerouting %tracedata $crlf
.timerstucked 1 7 did -e $dname 6
traceip
}
if ($did = 6) { unset %tracedata | .timerstucked off | sockclose whois }
}