Fserve Explorer — File Browser
FserveExplorerv1.0 / FserveExplorerv1.0 / abaexp10.mrc
abaexp10.mrc — 7.19 KB — Download this file
on *:OPEN:=: {
if (%aba.fserve.aopen == ON) {
explore $chr(61) $+ $nick
}
}
on *:CLOSE:=: {
set %nick $chr(61) $+ $nick
set %tmpnml aba_fserve_ $+ %nick
if ($dialog(%tmpnml)) {
dialog -c %tmpnml
}
}
dialog aba_fserve_main {
title "Fserve Explorer - By Abaratican"
size -1 -1 400 460
button "Refresh",1, 13 70 84 25
text "",2,1 1 1 1
combo 3, 63 155 220 300,sort,autohs
edit "",5, 1 1 1 1
edit "aba_fserve_explorer",6, 1 1 1 1
button "Up-Dir",8, 185 70 84 25,OK
button "Close",4, 271 70 84 25,OK
button "Execute",7, 99 70 84 25
box "Controls",9, 8 53 354 83
box "Current Info",12, 8 3 354 48
box "Files",10, 50 140 250 310
edit "",11, 13 20 345 25,read
button "Settings",13,13 105 84 25
button "Credit",14,99 105 84 25
edit "",15, 185 105 170 25,read
}
dialog aba_fserve_sttng {
title "Fserve Explorer Settings - By Abaratican"
size -1 -1 200 30
button "Auto-Open Toggle",1, 3 3 95 25
button "Close",2, 141 3 50 25,OK
edit "",3, 101 3 30 25,read
}
on *:CHAT:*credit*: {
set %nick $chr(61) $+ $nick
set %isin.lstgh no
set %nan
set %tmpnml aba_fserve_ $+ %nick
set %is.lstng n
set %newnm aba_fserve_ $+ %nick
if ($dialog(%newnm)) {
set %isin.lstgh yes
}
set %wd $gettok($1-,%i,32)
set %tp
if (mb isin %wd ) {
set %tp mb
}
if (gb isin %wd ) {
set %tp gb
}
if (tb isin %wd ) {
set %tp tb
}
if (%isin.lstgh == yes) {
set %i 1
set %nnmm n
set %nnm 0
:lpt
set %numtoken $numtok($1-,32)
if ($mid(%wd,1,1) isnum) {
set %nnmm y
set %nnm %i
}
if (%i < %numtoken) {
inc %i
goto lpt
}
set %wd $gettok($1-,%nnm,32)
set %nwwd
set %i 1
:crdtlp
if (%i <= $len(%wd) ) {
set %lttr $mid(%wd,%i,1)
if (%lttr isnum || %lttr == $chr(46) || %lttr == $chr(44) ) {
set %tmp %nwwd
set %nwwd %tmp $+ %lttr
}
inc %i
goto crdtlp
}
if (free isin $1-) {
set %nwwd FREE
set %nnmm y
}
if (leech isin $1-) {
set %nwwd LEECH
set %nnmm y
}
set %nan
if (%tp == %nan) {
set %tp b
}
if (%nwwd !isnum) {
set %tp
}
if (%nnmm == y && $chr(58) !isin %wd ) {
set %fserve.aba. $+ %nick $+ .credit %nwwd $+ %tp
shwcrdtlft %nick
}
}
}
alias shwcrdtlft {
set %nick $1-
set %tmpnml aba_fserve_ $+ %nick
did -r %tmpnml 15
set %pt1 set %
set %pt2 crdt %
set %pt3 fserve.aba. $+ %nick $+ .credit
set %pt %pt1 $+ %pt2 $+ %pt3
write -c tmpexplorer.txt %pt
$read tmpexplorer.txt
did -a %tmpnml 15 %crdt
}
on *:DIALOG:aba_fservesttng:sclick:*: {
if ($did == 1) {
if (%aba.fserve.aopen == off) {
set %aba.fserve.aopen ON
}
else {
if (%aba.fserve.aopen == on) {
set %aba.fserve.aopen OFF
}
}
did -r aba_fservesttng 3
did -a aba_fservesttng 3 %aba.fserve.aopen
}
}
on 1:DIALOG:aba_fservesttng:init:*: {
if (%aba.fserve.aopen) {
did -r aba_fservesttng 3
did -a aba_fservesttng 3 %aba.fserve.aopen
}
else {
set %aba.fserve.aopen OFF
did -r aba_fservesttng 3
did -a aba_fservesttng 3 %aba.fserve.aopen
}
}
alias explore {
set %nan
if ($1- != %nan) {
set %nick $1-
}
else {
set %nick $active
}
if ( $left(%nick,1) == $chr(61) ) {
set %tmpnml aba_fserve_ $+ %nick
if ($dialog(%tmpnml)) {
}
else {
dialog -m %tmpnml aba_fserve_main
}
did -r %tmpnml 5
did -a %tmpnml 5 %nick
msg %nick rules
msg %nick credit
msg %nick cd .
msg %nick dir
did -r %tmpnml 3
}
}
on *:DIALOG:aba_fserve_*:sclick:*: {
set %nick $did(5)
set %dlg $did(6)
if ( %dlg == aba_fserve_explorer ) {
set %pt1 set %
set %pt2 is.lstng %
set %pt3 fserve.aba. $+ %nick $+ .lstfls
set %pt %pt1 $+ %pt2 $+ %pt3
write -c tmpexplorer.txt %pt
$read tmpexplorer.txt
if ($did == 13) {
if ($dialog(aba_fservesttng)) {
}
else {
dialog -m aba_fservesttng aba_fserve_sttng
}
}
if (%is.lstng != y) {
if ($did == 1) {
msg %nick cd .
msg %nick dir
set %fserve.aba. $+ %nick $+ .lstfls y
did -r %tmpnml 3
}
if ($did == 7) {
set %flnm $did(3)
if ([FILE] isin %flnm) {
set %flnm $replace(%flnm,[FILE],%nan)
msg %nick get %flnm
}
}
if ([DIR] isin %flnm) {
set %flnm $replace(%flnm,[DIR],%nan)
msg %nick cd %flnm
msg %nick dir
set %fserve.aba. $+ %nick $+ .lstfls y
did -r %tmpnml 3
}
if ($did == 8) {
msg %nick cd ..
msg %nick dir
set %fserve.aba. $+ %nick $+ .lstfls y
did -r %tmpnml 3
}
if ($did == 14) {
msg %nick credit
}
}
}
}
on *:DIALOG:aba_fserve_*:dclick:*: {
set %nick $did(5)
set %dlg $did(6)
set %nan
if ( %dlg == aba_fserve_explorer ) {
if ($did == 3) {
set %flnm $did(3)
if ([FILE] isin %flnm) {
set %flnm $replace(%flnm,[FILE],%nan)
msg %nick get %flnm
}
}
if ([DIR] isin %flnm) {
set %flnm $replace(%flnm,[DIR],%nan)
msg %nick cd %flnm
msg %nick dir
set %fserve.aba. $+ %nick $+ .lstfls y
did -r %tmpnml 3
}
}
}
on 1:CHAT:*Closing Idle connection in * seconds*: {
set %nick $chr(61) $+ $nick
set %isin.lstgh no
set %nan
set %tmpnml aba_fserve_ $+ %nick
set %is.lstng n
set %newnm aba_fserve_ $+ %nick
if ($dialog(%newnm)) {
set %isin.lstgh yes
}
if (%isin.lstgh == yes) {
set %nick $chr(61) $+ $nick
msg %nick cd .
}
}
on 1:CHAT:*: {
if ($chr(92) isin $1-) {
if ($chr(42) isin $1-) {
set %nick $chr(61) $+ $nick
set %isin.lstgh no
set %nan
set %tmpnml aba_fserve_ $+ %nick
set %wasyes n
set %pt1 set %
set %pt2 is.lstng %
set %pt3 fserve.aba. $+ %nick $+ .lstfls
set %pt %pt1 $+ %pt2 $+ %pt3
write -c tmpexplorer.txt %pt
$read tmpexplorer.txt
if (%is.lstng == y) {
set %wasyes y
}
set %newnm aba_fserve_ $+ %nick
if ($dialog(%newnm)) {
set %isin.lstgh yes
}
if (%isin.lstgh == yes) {
if ($did(%tmpnml,6) == aba_fserve_explorer ) {
set %fserve.aba. $+ %nick $+ .lstfls y
if (%wasyes == n) {
did -r %tmpnml 3
}
}
}
}
else {
set %currentdir $right($1-,$calc($len($1-) - 1)))
set %currentdir $left(%currentdir,$calc($len(%currentdir) - 1)))
set %nick $chr(61) $+ $nick
set %nan
set %tmpnml aba_fserve_ $+ %nick
if ($dialog(%tmpnml)) {
did -r %tmpnml 11
did -a %tmpnml 11 $nick - %currentdir
}
}
}
set %nick $chr(61) $+ $nick
set %isin.lstgh no
set %nan
set %tmpnml aba_fserve_ $+ %nick
set %is.lstng n
set %newnm aba_fserve_ $+ %nick
if ($dialog(%newnm)) {
set %isin.lstgh yes
}
if (%isin.lstgh == yes) {
set %pt1 set %
set %pt2 is.lstng %
set %pt3 fserve.aba. $+ %nick $+ .lstfls
set %pt %pt1 $+ %pt2 $+ %pt3
write -c tmpexplorer.txt %pt
$read tmpexplorer.txt
if (%is.lstng == y) {
set %mmm $1-
if ($left($gettok(%mmm,$numtok(%mmm,32),32),$calc($len($gettok(%mmm,$numtok(%mmm,32),32)) - 1)) isnum && $right(%mmm,1) == b) {
set %mmm $deltok(%mmm,$numtok(%mmm,32),32)
if ($chr(3) isin $1- || $chr(42) isin $1- || $chr(92) isin $1- || $chr(2) isin $1- || $chr(31) isin $1- ) {
}
else {
did -a %tmpnml 3 [FILE] %mmm
}
}
else {
if ($chr(3) isin $1- || $chr(42) isin $1- || $chr(92) isin $1- || $chr(2) isin $1- || $chr(31) isin $1- ) {
}
else {
if ($1- != End Of List.) {
did -a %tmpnml 3 [DIR] $1-
}
else {
set %nick $chr(61) $+ $nick
set %pt1 set %
set %pt2 fserve.aba. $+ %nick $+ .lstfls n
set %pt %pt1 $+ %pt2
write -c tmpexplorer.txt %pt
$read tmpexplorer.txt
}
}
}
}
}
}
on 1:CHAT:[\*]: {
set %nick $chr(61) $+ $nick
set %isin.lstgh no
set %nan
set %tmpnml aba_fserve_ $+ %nick
set %is.lstng n
set %newnm aba_fserve_ $+ %nick
if ($dialog(%newnm)) {
set %isin.lstgh yes
}
if (%isin.lstgh == yes && $chr(41) isin $1- ) {
set %fserve.aba. $+ %nick $+ .lstfls y
}
}