Repositorio de scripts de irc.terrachat.cl desde los canales #TRAFFIC y #LATINWAREZ.
⬅️ Volver; FinchServ 3.53 desenvolvido por moisesh
; Release: 03/07/2007
;
; >> Os arquivos Search.dll, FirstMatch.dll, QuickList.exe, MediaInfo.dll
; foram obtidos do OMeNServE (www.omenscripts.net) e tem seus créditos à ele.
;
;-----------
; Eventos
;-----------
CTCP *:VERSION:fnc_ctcp_reply $nick
on *:LOAD:fnc_load
on *:START:fnc_onstart
on *:CONNECT:fnc_timers_check
on *:FILESENT:*.*:fnc_filesent $nick $filename
on *:SENDFAIL:*.*:fnc_sendfail $nick $filename
on *:QUIT:fnc_watch_check $nick
on *:PART:%fnc_channels:fnc_watch_check $nick
on *:KICK:%fnc_channels:fnc_watch_check $knick
on *:NICK:fnc_onnick $cid $nick $newnick
on *:TEXT:*@*:%fnc_channels:fnc_text_check $1-
on *:TEXT:*!*:%fnc_channels:fnc_text_check $1-
on *:TEXT:*@*:?:$fnc_text_check($1-).pvt
on *:TEXT:*!*:?:$fnc_text_check($1-).pvt
;--------
; Menus
;--------
menu menubar {
FindServ.2.1.(b).2025:fnc_open_dialog fncsetup
}
menu nicklist {
FinchServ
.@ $+ $1 $+ :say @ $+ $1
.@ $+ $1 $+ -stats:say @ $+ $1 $+ -stats
.@ $+ $1 $+ -que:say @ $+ $1 $+ -que
.@ $+ $1 $+ -remove:say @ $+ $1 $+ -remove
.@ $+ $1 $+ -top:say @ $+ $1 $+ -top
}
menu @fscolor {
dclick {
if ($fnc_getstyle($sline(@fscolor,1).ln)) { tokenize 32 $ifmatch }
else { return }
set %fnc_color_1 $1
set %fnc_color_2 $2
set %fnc_color_b $3
window -c @fscolor
}
}
;------------
; Aliases
;------------
alias finchserv fnc_open_dialog fncsetup
alias fnc_my_url return https://findserv.terrachat.cl
alias fnc_echo echo -s $bracket(FindServ 3.9b) $1-
alias fnc_listname_txt return $+(",$findfile($scriptdir,*-list.txt,1),")
alias fnc_listname_zip return $+(",$findfile($scriptdir,*-list.zip,1),")
alias fnc_listname_serv return $iif($isfile($fnc_listname_zip),$fnc_listname_zip,$fnc_listname_txt)
alias fnc_open_dialog dialog $iif($dialog($1),-v,-m) $1 $1
alias fnc_file return $+(",$scriptdir,$$1,")
alias fnc_onstart {
fnc_vars_check
unset %fnct_*
}
alias fnc_load {
fnc_vars_check
fnc_timers_check
echo 12 -a ** FindServ.2.1.(b).2025 instalado.
echo 12 -a ** Para configurar, digite /findserv
}
alias fnc_vars_check {
if (%fnc_server_on == $null) { set %fnc_server_on 1 }
if (%fnc_channels == $null) { set %fnc_channels $chr(35) }
if (%fnc_dcc_interval == $null) { set %fnc_dcc_interval 15 }
if (%fnc_echo_events == $null) { set %fnc_echo_events 1 }
if (%fnc_echo_msgs == $null) { set %fnc_echo_msgs 0 }
if (%fnc_max_sends == $null) { set %fnc_max_sends 2 }
if (%fnc_max_queue_total == $null) { set %fnc_max_queue_total 50 }
if (%fnc_max_queue_user == $null) { set %fnc_max_queue_user 10 }
if (%fnc_mincps_size == $null) { set %fnc_mincps_size 50 }
if (%fnc_watch_time == $null) { set %fnc_watch_time 5 }
if (%fnc_find_on == $null) { set %fnc_find_on 1 }
if (%fnc_find_interval == $null) { set %fnc_find_interval 5 }
if (%fnc_find_queue_no_respond == $null) { set %fnc_find_queue_no_respond 0 }
if (%fnc_buffer == $null) { set %fnc_buffer 2000 }
if (%fnc_note == $null) { set %fnc_note ... }
if (%fnc_ad_on == $null) { set %fnc_ad_on 1 }
if (%fnc_ad_interval == $null) { set %fnc_ad_interval 60 }
if (%fnc_pause_queue == $null) { set %fnc_pause_queue 0 }
if (%fnc_list_zip == $null) { set %fnc_list_zip 1 }
if (%fnc_list_dirs == $null) { set %fnc_list_dirs 1 }
if (%fnc_listauto_on == $null) { set %fnc_listauto_on 1 }
if (%fnc_listauto_time == $null) { set %fnc_listauto_time 3 }
if (%fnc_list_extensions == $null) { set %fnc_list_extensions *.mpu,*.db }
if (%fnc_list_trigger == $null) { set %fnc_list_trigger $mkfn($iif($me,$me,$mnick)) }
if (%fnc_list_files == $null) { set %fnc_list_files 0 }
if (%fnc_list_size == $null) { set %fnc_list_size 0 }
if (%fnc_list_updated == $null) { set %fnc_list_updated ??? }
if (%fnc_toplist_on == $null) { set %fnc_toplist_on 1 }
if (%fnc_ad_dccs == $null) { set %fnc_ad_dccs 1 }
if (%fnc_color_1 == $null) || (%fnc_color_2 == $null) || (%fnc_color_b == $null) {
set %fnc_color_1 01
set %fnc_color_2 05
set %fnc_color_b 15
}
if ($isfile($fnc_file(statistics.ini)) == $true) {
if ($readini $fnc_file(statistics.ini) main files > 0) { set %fnc_send_total $v1 }
if ($readini $fnc_file(statistics.ini) main size > 0) { set %fnc_send_size $v1 }
if ($readini $fnc_file(statistics.ini) main fail > 0) { set %fnc_send_failed $v1 }
if ($readini $fnc_file(statistics.ini) main rcps > 0) { set %fnc_send_rcps $v1 }
if ($readini $fnc_file(statistics.ini) main avgspeed > 0) { set %fnc_send_avgspeed $v1 }
if ($readini $fnc_file(statistics.ini) main list > 0) { set %fnc_send_list $v1 }
if ($readini $fnc_file(statistics.ini) main dcctime > 0) { set %fnc_send_time $v1 }
.remove $fnc_file(statistics.ini)
}
if (%fnc_send_total == $null) { set %fnc_send_total 0 }
if (%fnc_send_size == $null) { set %fnc_send_size 0 }
if (%fnc_send_failed == $null) { set %fnc_send_failed 0 }
if (%fnc_send_rcps == $null) { set %fnc_send_rcps 0 }
if (%fnc_send_avgspeed == $null) { set %fnc_send_avgspeed 0 }
if (%fnc_send_list == $null) { set %fnc_send_list 0 }
if (%fnc_send_countdate == $null || %fnc_send_countdate == 0) { set %fnc_send_countdate $date }
if (%fnc_send_time == $null) { set %fnc_send_time 0 }
if (%fnc_send_yesterday == $null || %fnc_send_DayYesterday != $date($calc($ctime - 86400),dddd)) {
set %fnc_send_yesterday 0
set %fnc_send_DayYesterday $date($calc($ctime - 86400),dddd)
}
if (%fnc_send_today == $null || %fnc_send_DayToday != $day) {
set %fnc_send_today 0
set %fnc_send_DayToday $day
}
writeini $fnc_file(listconfig.ini) ListMagic HeaderFile $fnc_file(header.txt)
writeini $fnc_file(listconfig.ini) ListMagic DirsFile $fnc_file(dirs.txt)
writeini $fnc_file(listconfig.ini) ListMagic ListLocation $+(",$scriptdir,")
}
alias fnc_ctcp_reply {
$iif(%fnct_flood_version >= 3,return,inc -u30 %fnct_flood_version)
.ctcpreply $1 VERSION FindServ.2.1.(b).2025
}
alias fnc_duration {
var %t = $$1
var %days = $int($calc(%t / 86400))
var %hms = $calc(%t % 86400)
var %hours = $int($calc(%hms / 3600))
var %ms = $calc(%hms % 3600)
var %mins = $int($calc(%ms / 60))
return $iif(%days > 0,%days $+ d) $iif(%hours > 0,%hours $+ h) %mins $+ m
}
alias fnc_list_view {
if ($isfile($fnc_listname_txt)) { run $fnc_listname_txt }
else { var %x = $input(Lista no encontrada!,o) }
}
alias fnc_servinchan {
if (%fnc_channels == $chr(35)) || ($istok(%fnc_channels,$1,44)) { return 1 }
}
alias fnc_strip_size {
var %extensions = mp3,m3u,wma,wav,asf,mid,mp4,mpeg,mpg,avi,mov,vob,rmvb,rar,zip,jpg,jpeg,bmp,gif,swf,pdf,txt,log,iso,doc,exe
var %x = 1
while ($gettok(%extensions,%x,44)) {
var %current_ext = . $+ $ifmatch
if ($pos($1-,%current_ext,1)) { return $left($1-,$calc($ifmatch + $len(%current_ext))) }
inc %x
}
return $1-
}
alias fnc_countsendtime {
var %x = 1
while (%x <= $send(0)) {
if ($send(%x).status == active) {
set %fnc_send_time $calc(%fnc_send_time + 10)
return
}
inc %x
}
}
alias fnc_file_find {
if (!$isfile($fnc_listname_txt)) { return }
if ($dll($fnc_file(firstmatch.dll),_GetFileName,1) != $scriptdir) {
.echo -q $dll($fnc_file(firstmatch.dll),_LoadFile,$remove($fnc_file(list.txt),"))
}
.echo -q $dll($fnc_file(firstmatch.dll),_DoSearch,$$1-)
var %filename = %fnct_find_file
unset %fnct_find_file
return %filename
}
alias dl.firstmatch set %fnct_find_file $1-
;min cps
alias fnc_mincps_check {
var %x = 1, %total = $send(0)
if ($timer(mincps_terminate)) { return }
while (%x <= %total) {
if ($send(%x).status == active && $send(%x).cps < %fnc_mincps_size) {
.timermincps_terminate -io 1 45 fnc_mincps_terminate $send(%x)
return
}
inc %x
}
}
alias fnc_mincps_terminate {
if ($send($1).cps < %fnc_mincps_size) {
if (%fnc_echo_events) {
fnc_echo El envío a $c(2) $+ $1 $c(1) $+ fue cancelado porque estaba por debajo del CPS mínimo
}
fnc_notice $send($1).cid $1 $c(1) $+ El envío de $c(2) $+ $send($1).file $c(1) $+ fue cancelado en $c(2) $+ $send($1).pc $+ % $c(1) $+ porque estuvo consecutivamente por debajo de $c(2) $+ %fnc_mincps_size CPS
close -s $1
}
}
;dcc watch
alias fnc_watch_check {
if ($send($1) && %fnc_server_on && %fnc_watch_on) {
var %x = 1, %found
while ($comchan($1,%x)) {
if ($istok(%fnc_channels,%chan,44) || %fnc_channels == $chr(35)) { %found = 1 }
inc %x
}
if (!%found) {
.timerwatch_terminate_ $+ $1 -io 1 $calc(%fnc_watch_time * 60) fnc_watch_terminate $1
}
}
}
alias fnc_watch_terminate {
if ($send($1) && $scid($send($1).cid).status == connected) {
scid $send($1).cid
if (!$comchan($1,0)) {
if (%fnc_echo_events) {
fnc_echo Cancelando DCCs de $c(2) $+ $1 $c(1) $+ porque salió y no volvió dentro del tiempo límite ( $+ $duration($calc(%fnc_watch_time * 60)) $+ )
}
close -s $1
}
}
}
;dcc
alias fnc_filesent {
var %x = 1 | while ($send($1,%x) && $nopath($2-) != $nopath($send($1,%x).file)) { inc %x }
if (%fnc_dcclog_on) {
write $fnc_file(sendlog.txt) $date(dd/mm/yy) $time(HH:nn) Envío completo de " $+ $nopath($2-) $+ " para " $+ $1 $+ " a $bytes($send($1,%x).cps,3).suf $+ /s
}
if ($nopath($2-) == $nopath($fnc_listname_serv)) {
inc %fnc_send_list
}
else {
inc %fnc_send_total
inc %fnc_send_size $lof($2-)
inc %fnc_send_totalup $send($1,%x).cps
set %fnc_send_avgspeed $calc(%fnc_send_totalup / %fnc_send_total)
if ($send($1,%x).cps > %fnc_send_rcps) { set %fnc_send_rcps $send($1,%x).cps }
if (%fnc_toplist_on) {
if ($read($fnc_file(toplist.txt),w,* $nopath($2-))) {
var %read = $ifmatch
write $+(-dl,$readn) $fnc_file(toplist.txt)
var %count = $calc($gettok(%read,1,32) + 1)
var %count = $str(0,$calc(6 - $len(%count))) $+ %count
write $fnc_file(toplist.txt) %count $nopath($2-)
}
else { write $fnc_file(toplist.txt) 000001 $nopath($2-) }
}
if ($day != %fnc_send_DayToday) {
set %fnc_send_yesterday %fnc_send_today
set %fnc_send_DayYesterday %fnc_send_DayToday
set %fnc_send_today 0
set %fnc_send_DayToday $day
}
inc %fnc_send_today
if (%fnc_ad_dccs) {
fnc_chan_msg $c(1) $+ Concluido: $c(2) $+ $nopath($2-) $+ $c(1) $+ ( $+ $c(2) $+ $bytes($lof($2-),3).suf $+ $c(1) $+ ) para $c(2) $+ $1 $c(1) $+ en $c(2) $+ $duration($send($1,%x).secs)) $c(1) $+ a $c(2) $+ $bytes($send($1,%x).cps,3).suf $+ /s $+ $c(1) $+ . [Enviados: $c(2) $+ $bytes(%fnc_send_total,b) $c(1) $+ ( $+ $c(2) $+ $bytes(%fnc_send_size,3).suf $+ $c(1) $+ ) Ayer: $c(2) $+ %fnc_send_yesterday $+ $c(1) $+ . Hoy: $c(2) $+ %fnc_send_today $+ $c(1) $+ $chr(93)
; Este fue el envío número $c(2) $+ $bytes(%fnc_send_total,b) $c(1) $+ desde $c(2) $+ %fnc_send_countdate
}
}
}
alias fnc_sendfail {
var %x = 1 | while ($send($1,%x) && $nopath($2-) != $nopath($send($1,%x).file)) { inc %x }
inc %fnc_send_failed
if (%fnc_dcclog_on) { write $fnc_file(sendlog.txt) $date(dd/mm/yy) $time(HH:nn) Error en el envío de " $+ $nopath($2-) $+ " a " $+ $1 $+ " en $send($1,%x).pc $+ % }
}
alias fnc_chan_msg {
var %x = 0
:id
inc %x
var %y = 1, %cid = $scon(%x)
$iif(%cid,scid %cid,return)
while ($chan(%y)) {
var %chan = $ifmatch, %mod = $chan(%chan).mode
if (m isincs %mod && $me !isvo %chan && $me !isop %chan) || (!$fnc_servinchan(%chan)) { }
else { fncbuffer scid $scon(%x) msg %chan $$1- }
inc %y
}
goto id
}
alias fnc_adv_line {
var %x = 1, %totalcps = 0
while (%x <= $send(0)) {
inc %totalcps $send(%x).cps
inc %x
}
%totalcps = $bytes(%totalcps,3).suf $+ /s
var %line = $c(1) $+ • Escribe $lc(2) $+ @ $+ %fnc_list_trigger $lc(1) $+ para mi lista de $lc(2) $+ $bytes(%fnc_list_files,b) $lc(1) $+ archivos ( $+ $lc(2) $+ $bytes(%fnc_list_size,3).suf $+ $lc(1) $+ ) actualizada en $lc(2) $+ %fnc_list_updated $+ $lc(1) $+ .
%line = %line $sv(Enviando,$send(0) $+ / $+ %fnc_max_sends)
%line = %line $sv(En la cola,$fnc_total_queues $+ / $+ %fnc_max_queue_total)
%line = %line $sv(Upstream,%totalcps)
%line = %line $lc(1) $+ Servido: $lc(2) $+ $bytes( %fnc_send_total ,b) $lc(1) $+ ( $+ $lc(2) $+ $bytes( %fnc_send_size ,3).suf $+ $lc(1) $+ ).
%line = %line $sv(Activo,$fnc_duration($uptime(mirc,3)))
if (%fnc_ad_note) { %line = %line $sv(Nota,%fnc_note) }
return %line FindServ.2.1.(b).2025 •
}
alias fnc_channel_advert fnc_chan_msg $fnc_adv_line
;colors
alias -l c return $chr(3) $+ %fnc_color_ [ $+ [ $$1 ] ] $+ $chr(44) $+ %fnc_color_b
alias -l lc return $chr(3) $+ %fnc_color_ [ $+ [ $$1 ] ]
alias -l sv return $lc(1) $+ $1 $+ : $lc(2) $+ $2 $+ $lc(1) $+ .
alias -l bracket return $+($c(1),$chr(91),$lc(2),$1,$lc(1),$chr(93))
alias fnc_getstyle {
;<cor1> <cor2> <corfundo> - $&
var %colors = 01 02 00|01 03 00|01 04 00|01 05 00|01 06 00|01 07 00|01 10 00|01 12 00|01 13 00|01 14 00$&
|00 03 01|00 04 01|00 07 01|00 08 01|00 09 01|00 10 01|00 11 01|00 13 01|00 15 01$&
|00 03 02|00 04 02|00 07 02|00 08 02|00 09 02|00 10 02|00 11 02|00 13 02|00 15 02$&
|00 08 03|00 09 03|00 15 03|00 01 04|00 02 04|00 05 04|00 06 04|00 12 04|00 08 04$&
|00 09 04|00 11 04|00 15 04|00 07 05|00 08 05|00 09 05|00 10 05|00 11 05|00 13 05|00 14 05$&
|00 07 06|00 08 06|00 09 06|00 11 06|00 13 06|00 15 06$&
|00 01 07|00 02 07|00 05 07|00 06 07|00 08 07|00 12 07$&
|01 02 08|01 03 08|01 04 08|01 05 08|01 06 08|01 07 08|01 10 08|01 12 08|01 13 08|01 14 08$&
|01 02 09|01 03 09|01 04 09|01 05 09|01 06 09|01 07 09|01 10 09|01 12 09|01 13 09|01 14 09$&
|00 01 10|00 02 10|00 04 10|00 05 10|00 06 10|00 07 10|00 12 10|00 13 10$&
|01 02 11|01 03 11|01 04 11|01 05 11|01 06 11|01 07 11|01 12 11|01 13 11|01 14 11$&
|00 07 12|00 08 12|00 09 12|00 11 12|00 13 12|00 15 12$&
|00 01 13|00 02 13|00 05 13|00 06 13|00 08 13|00 09 13|00 11 13|00 12 13|00 15 13$&
|00 01 14|00 02 14|00 04 14|00 05 14|00 06 14|00 08 14|00 09 14|00 11 14|00 12 14|00 15 14$&
|01 02 15|01 03 15|01 04 15|01 05 15|01 06 15|01 07 15|01 10 15|01 12 15$&
|02 05 00|03 06 00|04 10 00|05 12 00|06 13 00|07 14 00|10 02 00|12 03 00|13 04 00|14 05 00$&
|01 02 01|02 05 01|03 06 01|05 14 01|06 12 01|07 13 01|08 04 01|09 10 01|10 11 01$&
|01 02 02|02 05 02|03 06 02|04 12 02|05 13 02|06 14 02|07 01 02|08 10 02|09 11 02$&
|01 02 03|02 05 03|03 06 03|04 10 03|05 11 03|06 12 03|07 13 03|10 08 03|11 09 03$&
|01 03 04|02 06 04|03 07 04|04 09 04|05 10 04|06 11 04|07 14 04|08 13 04|09 01 04|10 12 04$&
|01 02 05|02 04 05|03 05 05|04 06 05|05 08 05|06 10 05|08 12 05|09 13 05|10 15 05$&
|01 02 06|02 04 06|03 06 06|04 08 06|05 10 06|06 12 06|08 13 06|09 15 06$&
|03 04 07|04 06 07|05 08 07|06 10 07|07 13 07|08 14 07|09 15 07$&
|03 02 08|04 06 08|05 09 08|06 10 08|07 11 08|08 14 08|09 13 08|10 12 08|11 05 08$&
|02 06 09|03 10 09|04 11 09|05 12 09|06 13 09|07 14 09|08 03 09|09 05 09$&
|03 06 10|04 08 10|05 09 10|06 10 10|07 11 10|08 12 10|09 13 10$&
|03 06 11|04 08 11|05 09 11|06 10 11|07 11 11|08 12 11|09 13 11$&
|01 03 12|02 04 12|04 06 12|05 09 12|06 10 12|08 13 12|09 14 12$&
|03 06 13|04 08 13|05 09 13|06 10 13|07 11 13|08 12 13|09 14 13$&
|03 06 14|04 08 14|05 09 14|06 10 14|07 11 14|08 12 14|09 13 14$&
|02 04 15|03 06 15|04 08 15|05 10 15|06 11 15|07 12 15|08 13 15|09 14 15
return $gettok(%colors,$1,124)
}
alias fnc_colorset {
window -c @fscolor
window -lad @FSColor 40 40 300 450 @FSColor Fixedsys 10
titlebar @fscolor 2 Haz clic 2 veces en la línea deseada.
var %linerep = c1,cb $+ Texto Normal c2 $+ Texto Destacado
var %x = 1
while ($fnc_getstyle(%x)) {
aline @fscolor $replace(%linerep,cb,$gettok($ifmatch,3,32),c1,$gettok($ifmatch,1,32),c2,$gettok($ifmatch,2,32))
inc %x
}
}
;timers check
alias fnc_timers_check {
if (%fnc_server_on && !$timer(fncque)) { .timerfncque -io 0 %fnc_dcc_interval fnc_queue_check }
if (%fnc_server_on && %fnc_mincps_on) { $iif(!$timer(fnccps),.timerfnccps -io 0 30 fnc_mincps_check) }
else { .timerfnccps off }
if (%fnc_server_on && %fnc_ad_on) { $iif(!$timer(fncad),.timerfncad -io 0 $calc(%fnc_ad_interval * 60) fnc_channel_advert) }
else { .timerfncad off }
if (%fnc_server_on && %fnc_listauto_on) { $iif(!$timer(FncAutoList),.timerFncAutoList -io 0 $calc(%fnc_listauto_time * 60 * 60) fnc_makelist_now) }
else { .timerFncAutoList off }
if (%fnc_server_on) { $iif(!$timer(FncSaveini),.timerFncSaveini -io 0 $calc(10*60) /saveini) }
else { .timerFncSaveini off }
if (!$timer(fncsendtime)) { .timerfncsendtime -io 0 10 fnc_countsendtime }
}
;msg & notice
alias fnc_notice fncbuffer fnc_msg_or_notice $1 $2 NOTICE $$3-
alias fnc_msg fncbuffer fnc_msg_or_notice $1 $2 PRIVMSG $$3-
alias fnc_msg_or_notice {
var %cid = $1, %nick = $2, %line = $4-, %mode = $3
if (!%line) { return }
$iif($scid(%cid),scid %cid,return)
if (!$comchan(%nick,0)) { return }
var %cm = $fnc_cmsg_check(%cid,%nick)
if (%fnc_echo_msgs) { echo -s $iif(%cm,C) $+ %mode %nick -> %line }
if (%cm) { raw -q C $+ %mode %nick $ifmatch : $+ %line }
else { raw -q %mode %nick : $+ %line }
}
alias fnc_cmsg_check {
;<cid> <nick>
if ($network != BRLink && $network != undernet) { return }
var %x = 1
while ($comchan($2,%x)) {
var %chan = $ifmatch
if ($me isop %chan) || ($me isvo %chan) { return %chan }
inc %x
}
}
alias fncbuffer {
if (!$window(@buffer_cmd)) { window -lh @buffer_cmd }
if (!$timer(fncbuff)) { .timerfncbuff -iom 0 %fnc_buffer fncbuffer }
if ($1) { aline @buffer_cmd $1- }
elseif ($line(@buffer_cmd,1)) {
dline @buffer_cmd 1
$ifmatch
}
}
alias fnc_current_buffer_time return $calc($line(@buffer_cmd,0) * %fnc_buffer / 1000)
;queue
alias fnc_total_queues return $iif($line(@fnc_dcc_queue,0),$ifmatch,0)
alias fnc_queue_remove {
if ($line(@fnc_dcc_queue,$1)) {
dline @fnc_dcc_queue $1
fnc_update_queues rem $1
}
}
alias fnc_queue_check {
var %x = 1, %total = $line(@fnc_dcc_queue,0)
if (%fnc_pause_queue) || (!%total) || ($send(0) >= %fnc_max_sends) { return }
while (%x <= %total) {
tokenize 1 $line(@fnc_dcc_queue,%x)
var %y = 1, %cid
while ($scon(%y)) {
if ($scon(%y).network == $1) { %cid = $scon(%y).cid }
inc %y
}
var %nick = $2, %fn = $3
if (%cid && !$send(%nick,0)) {
fnc_queue_remove %x
scid %cid
var %z = 1, %found
while ($comchan(%nick,%z)) {
var %chan = $ifmatch
if ($fnc_servinchan(%chan)) { %found = 1 }
inc %z
}
if (%found) {
if ($calc($ctime - $4) > %fnc_dcc_interval) {
fnc_notice %cid %nick $c(1) $+ Después de una espera de $c(2) $+ $duration($calc($ctime - $4)) $+ $c(1) $+ , te estoy enviando el archivo $c(2) $+ $nopath(%fn) $+ $c(1) $+ , $bytes($lof(%fn),3).suf $+ $c(1) $+ . Min. CPS: $c(2) $+ $iif(%fnc_mincps_on,%fnc_mincps_size,Off)
}
scid %cid dcc send -c %nick %fn
return
}
}
inc %x
}
}
alias fnc_onnick {
;cid nick newnick
var %total = $fline(@fnc_dcc_queue,$+($scid($1).network,,$2,*),0)
var %x = 1
while (%x <= %total) {
var %pos = $fline(@fnc_dcc_queue,$+($scid($1).network,,$2,*),1)
var %line = $line(@fnc_dcc_queue,%pos)
rline @fnc_dcc_queue %pos $puttok(%line,$3,2,1)
fnc_update_queues rem %pos
fnc_update_queues add %pos $3 $gettok(%line,3,1)
inc %x
}
}
;listmaker
alias LM.DEFAULT.CHECK { }
alias fnc_makelist_now {
dll -u FirstMatch.dll
dll -u Search.dll
var %x = 1
while (%x <= $send(0)) {
if ($nopath($send(%x).file) == $nopath($fnc_listname_serv) && $send(%x).status != sent) {
fnc_notice $send(%x).cid $send(%x).nick $c(1) $+ Perdón por cancelar este envío, pero estoy actualizando la lista de archivos. Espera unos instantes y pide la lista nuevamente
close -s [ $+ [ %x ] ]
}
inc %x
}
var %r = $findfile($scriptdir,*-list.txt,0,.remove " $+ $1- $+ ")
var %r = $findfile($scriptdir,*-list.zip,0,.remove " $+ $1- $+ ")
if (!%fnc_list_trigger) { set %fnc_list_trigger $mkfn($iiif($me,$me,$mnick)) }
writeini $fnc_file(listconfig.ini) Listmagic trigger ! $+ %fnc_list_trigger
writeini $fnc_file(QuickList.ini) Main IncludeFolders %fnc_list_dirs
var %ext = $remove(%fnc_list_extensions,*)
writeini $fnc_file(QuickList.ini) Main ExcludeExt $iif(%ext,$ifmatch,.none)
if ($isfile($fnc_file(statfile.txt))) { .remove $fnc_file(statfile.txt) }
run -p $fnc_file(QuickList.exe) $fnc_file(listconfig.ini)
.timerfnc_listcheck 0 1 fnc_listcheck
}
alias fnc_listcheck {
if ($isfile($fnc_file(statfile.txt))) {
.timerfnc_listcheck off
set %fnc_list_size $read($fnc_file(statfile.txt),t,0)
set %fnc_list_files $read($fnc_file(statfile.txt),1)
set %fnc_list_avg $int($read($fnc_file(statfile.txt),2)")
set %fnc_list_ttime $read($fnc_file(statfile.txt),3)
set %fnc_list_updated $date(dd/mm/yy)
var %listname = %fnc_list_trigger $+ ( $+ $date(dd-mm-yy) $+ )-list
.rename $fnc_file(nicelist.txt) $fnc_file($+(%listname,.txt))
write -il1 $fnc_listname_txt *****************************************************************************************
write -il1 $fnc_listname_txt Lista de $bytes(%fnc_list_files,b) archivos ( $+ $bytes(%fnc_list_size,3).suf $+ ) creada en $date con el FindServ.2.1.(b).2025
write -il2 $fnc_listname_txt Tiempo de creación de la lista: %fnc_list_ttime - Archivos procesados por segundo: %fnc_list_avg
write -il3 $fnc_listname_txt Para obtener un archivo, copia/pega (sin el tamaño) la línea correspondiente en el canal
write -il1 $fnc_listname_txt *****************************************************************************************
write -il4 $fnc_listname_txt $cr
write $fnc_listname_txt $cr
write $fnc_listname_txt ¡Y hasta aquí llega la lista!
if (%fnc_list_zip && $fnc_file(szip.dll)) {
var %a = $remove($fnc_listname_txt,")
var %b = $replace(%a,.txt,.zip)
.echo -q $dll($fnc_file(szip.dll),SZipFile,%a > %b)
}
fnc_echo ¡Lista concluida! Archivos: $c(2) $+ $bytes(%fnc_list_files,b) $c(1) $+ - Tamaño: $c(2) $+ $bytes(%fnc_list_size,3).suf
}
}
;requests
alias fnc_text_check {
var %cmd, %ocmd
tokenize 32 $strip($1-)
if ($1 == @find) || ($1 == @locator) { %ocmd = fnc_request_find $cid $nick $2- }
elseif ($1 == !list) { %ocmd = fnc_request_advert $cid $nick $2 }
elseif ($1 == ! $+ $me || $1 == ! $+ %fnc_list_trigger) { %cmd = fnc_request_file $cid $nick $2- }
elseif ($1 == @ $+ $me || $1 == @ $+ %fnc_list_trigger) { %cmd = fnc_request_list $cid $nick }
elseif ($1 == @ $+ $me $+ -stats || $1 == @ $+ %fnc_list_trigger $+ -stats) { %cmd = fnc_request_stats $cid $nick }
elseif ($1 == @ $+ $me $+ -que || $1 == @ $+ %fnc_list_trigger $+ -que) { %cmd = fnc_request_queue $cid $nick }
elseif ($1 == @ $+ $me $+ -remove || $1 == @ $+ %fnc_list_trigger $+ -remove) { %cmd = fnc_request_remove $cid $nick $2- }
elseif ($1 == @ $+ $me $+ -help || $1 == @ $+ %fnc_list_trigger $+ -help) { %cmd = fnc_request_help $cid $nick }
elseif ($1 == @ $+ $me $+ -top || $1 == @ $+ %fnc_list_trigger $+ -top) { %cmd = fnc_request_top $cid $nick }
if (%cmd || %ocmd) {
if ($prop == pvt && $line($nick,0) == 1) {
close -m $nick
var %x = 1, %found
while ($comchan($nick,%x)) {
var %chan = $ifmatch
if ($fnc_servinchan(%chan)) { %found = 1 }
inc %x
}
if (!%found) { return }
}
if (%ocmd && %fnc_server_on) { %ocmd }
elseif (%cmd && !%fnc_server_on) {
fnc_notice $cid $nick $c(1) $+ El servidor se fue a tomar un café! Intenta más tarde...
return
}
else { %cmd }
}
}
alias fnc_request_advert {
if ($fnc_current_buffer_time >= 25) || ($3 && $3 != $me) { return }
fnc_notice $1 $2 $fnc_adv_line
}
alias fnc_request_help {
if ($fnc_current_buffer_time >= 25) { return }
fnc_msg $1 $2 $c(1) $+ Comandos del FindServ (pueden ser escritos en el canal o en privado)
fnc_msg $1 $2 $c(2) $+ @ $+ %fnc_list_trigger $c(1) $+ => envía la lista de archivos
fnc_msg $1 $2 $c(2) $+ ! $+ %fnc_list_trigger <archivo> $c(1) $+ => envía un archivo
fnc_msg $1 $2 $c(2) $+ @ $+ %fnc_list_trigger $+ -stats $c(1) $+ => muestra los envíos
fnc_msg $1 $2 $c(2) $+ @ $+ %fnc_list_trigger $+ -que $c(1) $+ => muestra tu cola
fnc_msg $1 $2 $c(2) $+ @ $+ %fnc_list_trigger $+ -remove [<archivo>] $c(1) $+ => elimina un archivo de la cola o toda ella
if (%fnc_toplist_on) { fnc_msg $1 $2 $c(2) $+ @ $+ %fnc_list_trigger $+ -top $c(1) $+ => muestra los 10 archivos más enviados del FindServ }
}
alias fnc_request_stats {
if ($fnc_current_buffer_time >= 20) { return }
if (!$send(0) && !$get(0)) {
fnc_notice $1 $2 $c(1) $+ Ningún DCC en progreso actualmente
return
}
fnc_msg $1 $2 $c(1) $+ Status de DCC $iif($calc($send(0) + $get(0)) > 5,(solo los 5 primeros serán mostrados))
var %cps
var %show = 0
var %x = 1
while (%x <= $send(0) && %show <= 5) {
fnc_msg $1 $2 $c(1) $+ Enviando $c(2) $+ $send(%x).file $+ $c(1) $+ ( $+ $c(2) $+ $bytes($send(%x).size,3).suf $+ $c(1) $+ ) para $c(2) $+ $send(%x) $c(1) $+ a $c(2) $+ $bytes($send(%x).cps,3).suf $+ /s $c(1) $+ ( $+ $c(2) $+ $send(%x).pc $+ % $c(1) $+ completo)
inc %cps $send(%x).cps
inc %show
inc %x
}
var %x = 1
while (%x <= $get(0) && %show <= 5) {
fnc_msg $1 $2 $c(1) $+ Recibiendo $c(2) $+ $get(%x).file $+ $c(1) $+ ( $+ $c(2) $+ $bytes($get(%x).size,3).suf $+ $c(1) $+ ) de $c(2) $+ $get(%x) $c(1) $+ a $c(2) $+ $bytes($get(%x).cps,3).suf $+ /s $c(1) $+ ( $+ $c(2) $+ $get(%x).pc $+ % $c(1) $+ completo)
inc %cps $get(%x).cps
inc %show
inc %x
}
fnc_msg $1 $2 $c(1) $+ Total Envíos: $c(2) $+ $send(0) $+ $c(1) $+ . Recibidos: $c(2) $+ $get(0) $+ $c(1) $+ . CPS en uso: $c(2) $+ $bytes(%cps,3).suf $+ /s
}
alias fnc_request_queue {
if ($fnc_current_buffer_time >= 25) { return }
var %total = $fline(@fnc_dcc_queue,$+($scid($1).network,,$2,*),0)
if (!%total) {
fnc_notice $1 $2 $c(1) $+ No estás en mi cola de espera
return
}
var %pos = $fline(@fnc_dcc_queue,$+($scid($1).network,,$2,*),1)
var %line = $line(@fnc_dcc_queue,%pos)
fnc_notice $1 $2 $c(1) $+ Estás en la posición $c(2) $+ %pos $c(1) $+ de la cola de espera con el archivo $c(2) $+ $nopath($gettok(%line,3,1)) $+ $c(1) $+ , esperando desde hace $c(2) $+ $duration($calc($ctime - $gettok(%line,4,1))) $+ $c(1) $+ . Tienes en total $c(2) $+ %total $c(1) $+ archivo $+ $iif(%total > 1,s) esperando
}
alias fnc_request_remove {
;<cid> <nick> [<archivo>]
var %x = 1
while ($fline(@fnc_dcc_queue,$+($scid($1).network,,$2,*),%x)) {
var %pos = $ifmatch
var %filename = $gettok($line(@fnc_dcc_queue,%pos),3,1)
if (!$3 || $nopath(%filename) == $3-) { fnc_queue_remove %pos }
else { inc %x }
}
if ($3) { fnc_notice $1 $2 $c(1) $+ El archivo fue removido de la cola }
else { fnc_notice $1 $2 $c(1) $+ Todos los archivos fueron removidos de la cola }
}
alias fnc_request_list {
;<cid> <nick>
var %x = 1, %found
while ($send($1,%x)) {
var %filename = $send($1,%x).file
if ($nopath(%filename) == $nopath($fnc_listname_serv)) { %found = 1 }
inc %x
}
if (%found) {
fnc_notice $1 $2 $c(1) $+ Ya estás recibiendo la lista de archivos
return
}
if (!$isfile($fnc_listname_serv)) {
fnc_notice $1 $2 $c(1) $+ Lo siento, pero la lista no está disponible en este momento. Puede estar siendo actualizada o aún no ha sido creada. Intenta más tarde
return
}
if ($calc($send(0) - 2) >= %fnc_max_sends) {
fnc_notice $1 $2 $c(1) $+ Muchos envíos en progreso. Espera unos momentos e intenta nuevamente
return
}
fnc_notice $1 $2 $c(1) $+ Enviando: $c(2) $+ $nopath($fnc_listname_serv)
scid $1 dcc send -c $2 $fnc_listname_serv
}
alias xxl echo -s $1-
alias fnc_request_file {
;<cid> <nick> <file>
if (!$3) {
fnc_notice $1 $2 $c(1) $+ Usa: $c(2) $+ ! $+ %fnc_list_trigger <nombredearchivo> $c(1) $+ para solicitar un archivo
return
}
if ($fnc_file_find($3-)) { var %filename = $ifmatch }
else { var %filename = $fnc_file_find($fnc_strip_size($3-)) }
if (!$isfile(%filename)) {
fnc_notice $1 $2 $c(1) $+ Archivo no encontrado
return
}
var %x = 1, %found
while ($send($2,%x)) {
var %temp_file = $send($2,%x).file
if ($nopath(%filename) == $nopath(%temp_file)) { %found = 1 }
inc %x
}
if (%found) {
fnc_notice $1 $2 $c(1) $+ Ya estás recibiendo este archivo de mí
return
}
var %find = $+($scid($1).network,,$2,,%filename,*)
if ($fline(@fnc_dcc_queue,%find,1)) {
fnc_notice $1 $2 $c(1) $+ El archivo ya está en la cola de espera
return
}
if ($line(@fnc_dcc_queue,0) >= %fnc_max_queue_total) {
fnc_notice $1 $2 $c(1) $+ La cola de espera ya está llena
return
}
var %total = $fline(@fnc_dcc_queue,$+($scid($1).network,,$2,*),0)
if (%total >= %fnc_max_queue_user) {
fnc_notice $1 $2 $c(1) $+ Tu cola de espera ya está llena
return
}
if (!$window(@fnc_dcc_queue)) { window -lh @fnc_dcc_queue }
aline @fnc_dcc_queue $+($scid($1).network,,$2,,%filename,,$ctime)
var %pos = $line(@fnc_dcc_queue,0)
fnc_update_queues add %pos $2 %filename
var %current_que = $fline(@fnc_dcc_queue,$+($scid($1).network,,$2,*),0)
var %x = Min CPS: $c(2) $+ $iif(%fnc_mincps_on,%fnc_mincps_size,Off) $+ $c(1) $+ . Permitido: $c(2) $+ %current_que $+ / $+ %fnc_max_queue_user
fnc_notice $1 $2 $c(1) $+ El archivo $c(2) $+ $nopath(%filename) $c(1) $+ ha sido agregado en la posición $c(2) $+ %pos $c(1) $+ de la cola de espera. Escribe $c(2) $+ @ $+ %fnc_list_trigger $+ -help $c(1) $+ para ver más comandos. %x
if (!$timer(fncque)) { fnc_timers_check }
}
alias fnc_request_top {
if ($fnc_current_buffer_time >= 20) { return }
if (!%fnc_toplist_on) { fnc_msg $1 $2 $c(1) $+ Lo siento, pero la lista de top está deshabilitada. | return }
if (!$isfile($fnc_file(toplist.txt))) { fnc_msg $1 $2 $c(1) $+ La lista de top aún no está disponible. | return }
fnc_msg $1 $2 $c(1) $+ Top 10 archivos más descargados
window -c @topshow
window -lsh @topshow
filter -fw $fnc_file(toplist.txt) @topshow * *
var %out
var %y = $line(@topshow,0)
var %x = 1
while (%x <= 10) {
var %line = $line(@topshow,%y)
if ($gettok(%line,2,32) != $null) {
var %downloads = $gettok(%line,1,32)
inc %downloads
dec %downloads
fnc_msg $1 $2 ! $+ %fnc_list_trigger $gettok(%line,2-,32) ( $+ %downloads gets)
}
dec %y
inc %x
}
fnc_msg $1 $2 $c(1) $+ FIN. Existen $c(2) $+ $bytes($lines($fnc_file(toplist.txt)),b) $c(1) $+ archivos en la lista de top
window -c @topshow
}
alias fnc_request_find {
;<cid> <nick> <match>
if (!%fnc_find_on) || (!$3) { return }
if (%fnc_find_queue_no_respond && $fnc_total_queues >= %fnc_max_queue_total) { return }
if (%fnct_find_interval_ [ $+ [ $1 ] ]) { return }
if ($fnc_current_buffer_time >= 20) { return }
var %match = * $+ $replace($3-,$chr(32),*,?,*) $+ *
while (** isin %match) { var %match = $replace(%match,**,*) }
if (%match == $chr(42)) || ($len(%match) <= 3) { return }
set %fnct_find_cid $1
set %fnct_find_nick $2
set %fnct_find_match %match
if (!$isfile($fnc_listname_txt)) { return }
if ($nopath($dll($fnc_file(search.dll),GetFileName,1)) != $nopath($fnc_listname_txt)) {
.echo -q $dllcall($fnc_file(search.dll),fnc_sdll_loaded,LoadFile,$fnc_listname_txt)
}
else { fnc_sdll_loaded }
}
alias fnc_sdll_loaded {
dll $fnc_file(search.dll) SetMaxResults 500
dll $fnc_file(search.dll) SetOutFile $fnc_file(find.txt)
dll $fnc_file(Search.dll) DoSearch %fnct_find_match
}
alias dl.search {
;<found> <resultfile>
var %found = $1, %file = $2-
if (%found) {
tokenize 32 %fnct_find_cid %fnct_find_nick
;<cid> <nick>
set -u [ $+ [ %fnc_find_interval ] ] %fnct_find_interval_ [ $+ [ $1 ] ] 1
if (%fnc_echo_events) {
fnc_echo La búsqueda de $c(2) $+ $2 $c(1) $+ por $c(2) $+ %fnct_find_match $c(1) $+ encontró $c(2) $+ %found $c(1) $+ resultado $+ $iif(%found > 1,s)
}
fnc_msg $1 $2 $c(1) $+ Encontré $c(2) $+ %found $c(1) $+ archivo $+ $iif(%found > 1,s) con $c(2) $+ %fnct_find_match $+ $c(1) $+ . Enviando: $c(2) $+ $send(0) $+ / $+ %fnc_max_sends $+ $c(1) $+ . En la cola: $c(2) $+ $fnc_total_queues $+ / $+ %fnc_max_queue_total
var %x = 1
while (%x <= 5 && $read(%file,%x)) {
fnc_msg $1 $2 $ifmatch
inc %x
}
fnc_msg $1 $2 $c(1) $+ Para solicitar un archivo, copie y pegue la línea correspondiente en el canal o PVT (sin el tamaño del archivo). Escriba $c(2) $+ @ $+ %fnc_list_trigger $c(1) $+ para recibir la lista completa con $c(2) $+ $bytes(%fnc_list_files,b) $c(1) $+ archivos. FindServ.2.1.(b).2025
}
unset %fnct_find_cid %fnct_find_nick %fnct_find_match
.remove $fnc_file(find.txt)
}
;--------------
; Setup Dialog
;--------------
dialog fncsetup {
title "FindServ.2.1.(b).2025"
size -1 -1 480 290
button "&Ok", 97, 15 260 60 22, ok, default
button "Cancelar", 98, 85 260 60 22, cancel
button "Aplicar", 99, 155 260 60 22
text "Website:", 51, 240 265 45 15
link $fnc_my_url, 50, 290 265 160 15
tab "General", 81, 5 5 470 250
tab "DCC/Ad", 82
tab "Lista", 87
tab "Cola [Qué]", 89
tab "Estadísticas", 88
radio "Servidor Encendido", 263, 20 40 120 20, group, tab 81
radio "Servidor Apagado", 264, 20 60 120 20, tab 81
check "Mostrar eventos del fserv en el estado", 265, 20 95 230 15, tab 81
check "Mostrar msgs/notices del fserv en el estado", 145, 20 115 230 15, tab 81
check "Responder en las búsquedas (@find/@locator)", 32, 20 145 250 20, tab 81
check "Deshabilitar búsquedas cuando la cola esté llena", 11, 20 165 250 20, tab 81
text "Intervalo entre búsquedas (seg)", 43, 20 192 180 20, tab 81
edit %fnc_find_interval, 35, 180 188 30 20, center, tab 81
text "Intervalo entre msgs/notices:", 55, 20 222 200 20, tab 81
combo 56, 180 218 70 100, size drop, tab 81
box "Servir en los canales", 45, 270 40 190 150, tab 81
combo 46, 280 60 125 115, tab 81
button "Add", 47, 410 100 40 22, tab 81
button "Rem", 48, 410 125 40 22, tab 81
check "Todos los canales", 49, 280 165 110 20, tab 81
button "Colores de FindServ", 60, 280 195 135 22, tab 81
button "Desinstalar FindServ", 74, 280 220 135 22, tab 81
text "Máx. envíos simultáneos:", 13, 20 40 210 20, tab 82
edit %fnc_max_sends, 12, 235 35 40 20, center tab 82
text "Máx. archivos en la cola (por nick):", 17, 20 60 210 20, tab 82
edit %fnc_max_queue_user, 16, 235 55 40 20, center, tab 82
text "Máx. archivos en la cola (total):", 20, 20 80 210 20, tab 82
edit %fnc_max_queue_total, 21, 235 75 40 20, center, tab 82
text "Intervalo entre transferencias (segs):", 61, 20 100 210 20, tab 82
edit %fnc_dcc_interval, 58, 235 95 40 20, center, tab 82
check "Cancelar envíos por debajo de:", 77, 20 120 210 15, tab 82
edit %fnc_mincps_size, 78, 235 115 40 20, center, tab 82
text "cps", 57, 285 120 50 20, tab 82
check "Cancelar envío si el nick no regresa después de:", 85, 20 140 210 15, tab 82
edit %fnc_watch_time, 86, 235 135 40 20, center, tab 82
text "min", 83, 285 140 50 20, tab 82
check "Anunciar en los canales cada:", 30, 20 160 210 15, tab 82
edit %fnc_ad_interval, 31, 235 155 40 20, center, tab 82
text "min", 33, 285 160 150 15, tab 82
check "Incluir nota opcional en el anuncio:", 72, 20 180 210 15, tab 82
edit %fnc_note, 39, 235 175 200 20, autohs, limit 150, tab 82
check "Anunciar envíos DCC completos", 34, 20 200 210 15, tab 82
box "Directorios", 80, 10 35 305 110, tab 87
list 71, 20 55 230 90, sort, vsbar, tab 87
button "Add", 75, 255 75 50 22, tab 87
button "Rem", 73, 255 100 50 22, tab 87
check "Auto actualizar lista cada:", 38, 20 155 150 15, tab 87
edit %fnc_listauto_time, 37, 175 152 35 20, center, tab 87
text "hora(s)", 36, 218 155 150 15, tab 87
check "Comprimir lista (ZIP)", 15, 20 175 130 15, tab 87
check "Incluir directorios", 18, 20 195 130 15, tab 87
button "Editar bienvenida", 29, 160 180 100 22, tab 87
text "Nick por defecto:", 76, 20 220 120 20, tab 87
edit %fnc_list_trigger, 79, 130 215 130 22, autohs, limit 25, tab 87
box "Excluir extensiones", 22, 320 35 145 145, tab 87
combo 23, 330 55 75 130, tab 87
button "Add", 24, 415 100 40 22, tab 87
button "Rem", 25, 415 125 40 22, tab 87
box "Lista de archivos", 28, 280 185 185 55, tab 87
button "Crear lista", 27, 290 205 80 25, tab 87
button "Ver lista", 26, 375 205 80 25, tab 87
list 121, 10 35 350 185, size extsel hsbar vsbar, tab 89
button "Subir", 122, 370 50 85 24, tab 89
button "Bajar", 123, 370 75 85 24, tab 89
button "Enviar ahora", 124, 370 105 85 24, tab 89
button "Eliminar ítem", 125, 370 130 85 24, tab 89
button "Eliminar todo", 126, 370 175 85 24, tab 89
check "Pausar cola", 127, 10 230 130 15, tab 89
text "Archivos en la cola: 0", 120, 200 231 150 15, tab 89
box "Estadísticas", 91, 20 35 270 195, tab 88
text "Contador desde:", 101, 100 55 170 20, tab 88
text "Archivos enviados:", 93, 88 75 170 20, tab 88
text "Envíos fallidos:", 94, 113 95 170 20, tab 88
text "Listas enviadas:", 95, 103 115 180 20, tab 88
text "Velocidad récord:", 96, 85 135 180 20, tab 88
text "Velocidad media de envío:", 90, 50 155 180 20, tab 88
text "Tiempo total enviando DCC:", 100, 48 175 250 20, tab 88
text "", 52, 185 55 90 20, tab 88
text "", 40, 185 75 90 20, tab 88
text "", 41, 185 95 90 20, tab 88
text "", 44, 185 115 90 20, tab 88
text "", 42, 185 135 90 20, tab 88
text "", 64, 185 155 90 20, tab 88
text "", 65, 185 175 90 20, tab 88
button "Reiniciar", 54, 115 200 80 22, tab 88
box "Top 10", 92, 310 35 110 90, tab 88
check "Habilitar", 53, 320 50 95 15, tab 88
button "Visualizar", 59, 320 70 80 22, tab 88
button "Reiniciar", 62, 320 95 80 22, tab 88
box "Registro DCC", 66, 310 140 110 90, tab 88
check "Habilitar", 67, 320 155 95 15, tab 88
button "Visualizar", 68, 320 175 80 22, tab 88
button "Limpiar", 69, 320 200 80 22, tab 88
}
on *:dialog:fncsetup:init:0:{
did -c $dname $iif(%fnc_server_on,263,264)
if (%fnc_echo_events) { did -c $dname 265 }
if (%fnc_echo_msgs) { did -c $dname 145 }
if (%fnc_mincps_on) { did -c $dname 77 }
if (%fnc_watch_on) { did -c $dname 85 }
if (%fnc_find_on) { did -c $dname 32 }
if (%fnc_find_queue_no_respond) { did -c $dname 11 }
if (%fnc_ad_on) { did -c $dname 30 }
if (%fnc_ad_dccs) { did -c $dname 34 }
if (%fnc_ad_note) { did -c $dname 72 }
if (%fnc_list_zip) { did -c $dname 15 }
if (%fnc_list_dirs) { did -c $dname 18 }
if (%fnc_listauto_on) { did -c $dname 38 }
if (%fnc_toplist_on) { did -c $dname 53 }
if (%fnc_dcclog_on) { did -c $dname 67 }
if (%fnc_pause_queue) { did -c $dname 127 }
$iif(%fnc_channels == $chr(35),did -c $dname 49,didtok -a $dname 46 44 %fnc_channels)
didtok -a $dname 56 44 1500ms,2000ms,2500ms,3000ms
did -c $dname 56 $didwm($dname,56,%fnc_buffer $+ *,1)
var %x = 1 | while (%x <= $lines($fnc_file(dirs.txt))) { did -a $dname 71 $read($fnc_file(dirs.txt),%x) | inc %x }
didtok $dname 23 44 %fnc_list_extensions
.timer 1 1 fnc_queue_list
fnc_statsdlg
fnc_setup_db_check
}
alias fnc_dsapply {
if ($did(12) !isnum 1-50) { halt $input(La opción " Máx. envíos simultáneos " debe estar marcada entre 1 y 50, por favor) }
if ($did(16) !isnum 1-50) { halt $input(La opción " Máx. archivos en la cola (por nick) " debe estar marcada entre 1 y 50, por favor) }
if ($did(21) !isnum 1-200) { halt $input(La opción " Máx. archivos en la cola (total) " debe estar marcada entre 1 y 200, por favor) }
if ($did(58) !isnum 5-30) { halt $input(La opción " Intervalo entre transferencias " debe estar marcada entre 5 y 30, por favor) }
if ($did(78) !isnum 1-9999) { halt $input(La opción " Cancelar envíos por debajo de " debe estar marcada entre 1 y 9999, por favor) }
if ($did(86) !isnum 1-30) { halt $input(La opción " Cancelar envío si el nick no vuelve después de " debe estar marcada entre 1 y 30, por favor) }
if ($did(35) !isnum 5-180) { halt $input(La opción " Intervalo entre búsquedas " debe estar marcada entre 5 y 180, por favor) }
if ($did(31) !isnum 30-36000) { halt $input(La opción " Anunciar en los canales cada " debe estar marcada entre 30 y 36000, por favor) }
if (%fnc_dcc_interval != $did(58)) { .timerfncque off }
if (%fnc_ad_interval != $did(31)) { .timerfncad off }
if (%fnc_buffer != $remove($did(56,1).seltext,ms)) {
.timerfncbuff off
.timer 1 0 fncbuffer
}
set %fnc_buffer $remove($did(56,1).seltext,ms)
set %fnc_server_on $did(263).state
set %fnc_echo_events $did(265).state
set %fnc_echo_msgs $did(145).state
set %fnc_find_interval $did(35)
set %fnc_find_on $did(32).state
set %fnc_find_queue_no_respond $did(11).state
set %fnc_max_sends $did(12)
set %fnc_max_queue_user $did(16)
set %fnc_max_queue_total $did(21)
set %fnc_dcc_interval $did(58)
set %fnc_mincps_on $did(77).state
set %fnc_mincps_size $did(78)
set %fnc_watch_on $did(85).state
set %fnc_watch_time $did(86)
set %fnc_ad_on $did(30).state
set %fnc_ad_interval $did(31)
set %fnc_ad_dccs $did(34).state
set %fnc_ad_note $did(72).state
set %fnc_note $did(39)
set %fnc_toplist_on $did(53).state
set %fnc_dcclog_on $did(67).state
if ($did(49).state) || (!$did(46).lines) { set %fnc_channels $chr(35) }
else {
unset %fnc_channels
var %x = 1 | while ($did(46,%x)) { set %fnc_channels $addtok(%fnc_channels,$ifmatch,44) | inc %x }
}
fnc_listdlg
fnc_timers_check
}
alias fnc_setup_db_check {
did $iif($did(32).state,-e,-b) $dname 11,43,35
did $iif($did(49).state,-b,-e) $dname 46,47,48
did $iif($did(30).state,-e,-b) $dname 31,33
did $iif($did(72).state,-e,-b) $dname 39
did $iif($did(38).state,-e,-b) $dname 37
did $iif($did(77).state,-e,-b) $dname 78,57
did $iif($did(85).state,-e,-b) $dname 86,83
}
on *:dialog:fncsetup:sclick:97:fnc_dsapply
on *:dialog:fncsetup:sclick:99:fnc_dsapply
;-----------------
; Geral tab
;-----------------
on *:dialog:fncsetup:sclick:30:fnc_setup_db_check
on *:dialog:fncsetup:sclick:32:fnc_setup_db_check
on *:dialog:fncsetup:sclick:49:fnc_setup_db_check
on *:dialog:fncsetup:sclick:47:{
if (!$did(46).sel && $did(46).text) {
did -a $dname 46 $iif($left($did(46).text,1) != $chr(35),$chr(35)) $+ $did(46).text
did -c $dname 46 $did(46).lines
}
}
on *:dialog:fncsetup:sclick:48:if ($did(46).sel) { did -d $dname 46 $ifmatch }
on *:dialog:fncsetup:sclick:50:url $fnc_my_url
on *:dialog:fncsetup:sclick:60:fnc_colorset
on *:dialog:fncsetup:sclick:74:{
if (!$input(Tem certeza que deseja desinstalar o FinchServ?,y)) { return }
if (!$input(Certeza absoluta?,y)) { return }
dialog -x fncsetup
if ($input(¿Desea eliminar completamente las variables de FindServ.2.1.(b).2025 $+ $chr(44) que contienen todas las configuraciones del mismo? (Si desea reinstalar FindServ.2.1.(b).2025 más tarde $+ $chr(44) haga clic en No),y)) {
echo 4 -a Eliminando variables...
unset %fnc_*
}
echo 4 -a Apagando temporizadores...
.timerfnc* off
echo 12 -a ** FindServ.2.1.(b).2025 desinstalado con éxito!
unload -rs " $+ $script $+ "
}
;--------------
; DCC tab
;--------------
on *:dialog:fncsetup:sclick:85:fnc_setup_db_check
on *:dialog:fncsetup:sclick:77:fnc_setup_db_check
on *:dialog:fncsetup:sclick:72:fnc_setup_db_check
;-------------
; List tab
;-------------
on *:dialog:fncsetup:sclick:38:fnc_setup_db_check
on *:dialog:fncsetup:sclick:25:if ($did(23).sel) { did -d $dname 23 $ifmatch }
on *:dialog:fncsetup:sclick:27:fnc_listdlg makenow
on *:dialog:fncsetup:sclick:26:fnc_list_view
on *:dialog:fncsetup:sclick:29:run notepad $fnc_file(header.txt)
on *:dialog:fncsetup:sclick:73:if ($did(71).sel) { did -d $dname 71 $did(71).sel }
on *:dialog:fncsetup:sclick:75:{
if ($sdir($iif(%fnc_list_dialog_last_dir,$ifmatch,$mircdir),Diretorio:)) {
did -a $dname 71 $ifmatch
set %fnc_list_dialog_last_dir $ifmatch
}
}
on *:dialog:fncsetup:sclick:24:{
var %e = $did(23).text
if (!$did(23).sel && %e) {
if (*. !isin %e) || ($len(%e) < 3) {
halt $input(¡Formato inválido! $crlf $+ Use: *.extensión $crlf $+ Ej: *.mp3,o)
}
did -a $dname 23 %e
did -c $dname 23 $did(23).lines
}
}
alias fnc_listdlg {
if ($did(37) !isnum 1-60) { halt $input(La opción "Actualizar lista automáticamente cada" debe estar entre 1 y 60,o) }
if ($did(37) != %fnc_listauto_time) { .timerFncAutoList off }
set %fnc_list_zip $did(15).state
set %fnc_list_dirs $did(18).state
set %fnc_listauto_on $did(38).state
set %fnc_listauto_time $did(37)
if ($did(71).lines = 0) { halt $input(¡No seleccionaste ningún directorio para la lista de archivos!,o) }
write -c $fnc_file(dirs.txt)
var %x = 1 | while $did(71,%x) { write $fnc_file(dirs.txt) $ifmatch | inc %x }
var %trigger = $mkfn($remove($gettok($strip($did(79)),1,32),@,!))
if (!%trigger) { halt $input(Debes llenar correctamente el campo "Nick (trigger) por defecto",o) }
if (%trigger != %fnc_list_trigger && !$1) { halt $input(Has cambiado el campo "Nick (trigger) por defecto". Para que el FindServ.2.1.(b).2025 siga funcionando correctamente $+ $chr(44) deberás actualizar la lista de archivos haciendo clic en "Lista -> Crear lista",o) }
set %fnc_list_trigger %trigger
unset %fnc_list_extensions
if ($did(23,1) != $null) {
var %x = 1 | while ($did(23,%x)) { set %fnc_list_extensions $addtok(%fnc_list_extensions,$ifmatch,44) | inc %x }
}
if ($1 == makenow) { fnc_makelist_now }
}
;------------
; Stats tab
;------------
on *:dialog:fncsetup:sclick:54:{
if ($input(¿Estás seguro de que deseas restablecer las estadísticas?,y)) {
set %fnc_send_failed 0
set %fnc_send_rcps 0
set %fnc_send_avgspeed 0
set %fnc_send_totalup 0
set %fnc_send_size 0
set %fnc_send_total 0
set %fnc_send_list 0
set %fnc_send_countdate $date
set %fnc_send_time 0
fnc_statsdlg
}
}
on *:dialog:fncsetup:sclick:62:{
if ($input(¿Estás seguro de que deseas restablecer la toplist?,y)) { write -c $fnc_file(toplist.txt) }
}
on *:dialog:fncsetup:sclick:59:{
window -c @topshow
window -lsh @topshow
filter -fw $fnc_file(toplist.txt) @topshow * *
window -c @toplist
window -lad @toplist 40 40 450 420 @FSColor Fixedsys 10
titlebar @toplist :: Top 25 descargas ::
var %out
var %y = $line(@topshow,0)
var %x = 1
while (%x <= 20) {
var %line = $line(@topshow,%y)
if ($gettok(%line,2,32) != $null) {
var %downloads = $gettok(%line,1,32)
aline @toplist %downloads $+ x $gettok(%line,2-,32)
}
dec %y
inc %x
}
}
on *:dialog:fncsetup:sclick:68:{
run notepad $fnc_file(sendlog.txt)
}
on *:dialog:fncsetup:sclick:69:{
if ($input(¿Estás seguro de que deseas limpiar el registro DCC?,y)) { write -c $fnc_file(sendlog.txt) }
}
alias fnc_statsdlg {
if ($dialog(fncsetup)) {
if (!$timer(FncStatsDlg)) { .timerFncStatsDlg -io 0 5 fnc_statsdlg }
did -a fncsetup 52 %fnc_send_countdate
did -a fncsetup 40 $bytes( %fnc_send_total ,b) ( $+ $bytes( %fnc_send_size ,3).suf $+ )
did -a fncsetup 41 $bytes( %fnc_send_failed ,b)
did -a fncsetup 44 $bytes( %fnc_send_list ,b)
did -a fncsetup 42 $bytes( %fnc_send_rcps ,3).suf $+ /s
did -a fncsetup 64 $bytes( %fnc_send_avgspeed ,3).suf $+ /s
did -a fncsetup 65 $fnc_duration( %fnc_send_time )
}
else { .timerFncStatsDlg off }
}
;------------
; Queue tab
;------------
on *:dialog:fncsetup:sclick:122:fnc_moveque -
on *:dialog:fncsetup:sclick:123:fnc_moveque +
on *:dialog:fncsetup:sclick:125:if ($did(121).sel) { fnc_queue_remove $ifmatch }
on *:dialog:fncsetup:sclick:126:if ($input(¿Estás seguro?,y)) { while ($line(@fnc_dcc_queue,1)) { fnc_queue_remove 1 } }
on *:dialog:fncsetup:sclick:127:set %fnc_pause_queue $did(127).state
on *:dialog:fncsetup:sclick:124:{
if ($did(121).sel) {
var %did = $ifmatch, %line = $line(@fnc_dcc_queue,%did)
var %x = 1, %cid
while (%x <= $scon(0)) {
if ($scon(%x).network == $gettok(%line,1,1)) { %cid = $scon(%x) }
inc %x
}
var %nick = $gettok(%line,2,1), %fn = $gettok(%line,3,1)
if (%cid) {
fnc_queue_remove %did
scid %cid dcc send -c %nick %fn
}
else { var %x = $input(¡No se pudo enviar el archivo!,o) }
fnc_queue_remove %did
}
}
alias fnc_queue_list {
var %x = 1, %total = $line(@fnc_dcc_queue,0)
while (%x <= %total) {
tokenize 1 $line(@fnc_dcc_queue,%x)
fnc_update_queues add %x $2 $3
inc %x
}
}
alias fnc_update_queues {
;<add> <pos> <nick> <file>
;<rem> <num>
if (!$dialog(fncsetup)) { return }
if ($1 == add) { did -i fncsetup 121 $2 $3 .. $nopath($4-) }
if ($1 == rem) { did -d fncsetup 121 $2 }
did -z fncsetup 121
did -ra fncsetup 120 Archivos en la cola: $line(@fnc_dcc_queue,0)
}
alias fnc_moveque {
if ($did(121).sel) {
var %did = $ifmatch
var %calc = $calc(%did $1 1)
if (%calc !isnum 1- [ $+ [ $did(121).lines ] ]) { return }
var %wnextline = $line(@fnc_dcc_queue,%calc), %wcurrline = $line(@fnc_dcc_queue,%did)
var %dnextline = $did(121,%calc), %dcurrline = $did(121,%did)
rline @fnc_dcc_queue %did %wnextline
rline @fnc_dcc_queue %calc %wcurrline
did -o $dname 121 %did %dnextline
did -o $dname 121 %calc %dcurrline
did -c $dname 121 %calc
}
}
👁️ 8 vistas • 📥 0 descargas