Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

; FSE by Eric^^

; ericn@accesswave.ca
;
; opens when a file server is initilized
alias fse dialog -md fse $+ . $+ $1 fse
dialog fse {
title "FSE - File Server Explorer"
icon fileservers.ico
size -1 -1 525 345
button "OK", 1, 445 315 75 25, cancel
box "Explorer", 2, 5 5 515 300
list 3, 13 23 500 275, size
}
on *:dialog:fse.*:init:*:{
dialog -t $dname Exploring $right($dname,-4) - [FSE]
}
on *:dialog:fse.*:dclick:3:{
var %nick = = $+ $right($dname,-4),%sel = $$did($dname,3).seltext
if (%sel === $upper(%sel)) msg %nick cd $iif(%sel == [..],..,%sel)
elseif (%sel === $lower(%sel)) msg %nick get %sel
}
#fse on
on *:chat:*:{
if (['C' for more, 'S' to stop] == $1-) { msg =$nick S }
if (mIRC*File Server* iswm $1-) {
fse $nick
msg =$nick dir
}
var %dialog = fse. $+ $nick
if ($dialog(%dialog)) {
if ($1- == End of list.) unset $+(%,fse,.,$nick)
if ($eval($+(%,fse,.,$nick),2)) {
var %arg = $1if ($lower(%arg) === %arg) {
if ($regex(%arg,^[[:alnum:]\.\-_]+ [0-9]+(b|kb|mb)$)) %arg = $gettok(%ar
g,1- $+ $calc($numtok(%arg,32) -1),32)
if ($regex(%arg,^[[:alnum:]\.\-_]+ [0-9\.]+ (b|kb|mb)$)) %arg = $gettok(
%arg,1- $+ $calc($numtok(%arg,32) -2),32)
}
did -a %dialog 3 $iif($strip(%arg) == ..,[..],$strip(%arg))
}
if ([\*] iswm $1-) {
if (\*.*] isin $1-) { set $+(%,fse,.,$nick) 1 | did -r %dialog 3 }
else msg =$nick dir
}
}
}
on *:CLOSE:=:if ($dialog(fse. $+ $nick)) dialog -c fse. $+ $nick
#fse end
menu channel,menubar {
&FSE
.&Open:fse
.. $iif($group(#FSE) == on,$style(1)) &Enabled: $iif($group(#FSE) == on,.disabl
e,.enable) #fse
}

You might also like