Repositorio de scripts de irc.terrachat.cl desde los canales #TRAFFIC y #LATINWAREZ.
⬅️ Volver##################################################################
##################################################################
## ##
## __ __ __________ ___ ______________________ ##
## __/ // //_ __/ __ \/ | / ____/ ____/ _/ ____/ ##
## /_ _ __// / / /_/ / /| | / /_ / /_ / // / ##
## /_ _ __// / / _, _/ ___ |/ __/ / __/ _/ // /___ ##
## /_//_/ /_/ /_/ |_/_/ |_/_/ /_/ /___/\____/ ##
## IRC.TERRACHAT.CL ##
## ##
## [ https://goo.gl/AizEkU ] ##
## Copyright �2003/2022. All rights reserved. ##
## ##
##################################################################
## ORIGINAL LANGUAGE - TRANSLATION INTO ENGLISH BY #TRAFFIC ##
##################################################################
## 15:42 15-10-2022 ##
##################################################################
###################
### Load module ###
###################
loadmodule filesys
#################
### Config ####
#################
# MP3 file directory (full-path) -> "/" al final
set diretorio "/home/t/terrachat/eggdrop/mp3/"
# TCL archive directory
# Files are now saved as @botnick-List.txt
set tcldir "mp3data/"
# Maximum Files in Queue
set maxqueue 10
# Maximum DCC Send
set slot 4
# Message sending time
set time 17
# Radom MP3 upload time
set time2 5
# BOT channels (space separated)
set home "#MP3PASSION #TRAFFIC #MP3ZONE"
# The number of rank files
set rank 10
# Minimum characters for search / @locator
set minchar 3
# Maximum number of songs on @locator
set maxmp3s 20
# What am I serving?
set servindo "Always New Music!"
#############
### Files ###
#############
# File where to store files in the queue
set queuefile "$nick-Espera.dat"
# File where to place the BOT MP3 List
set filesarq "$nick-List.txt"
# File to store Ranking // Top 10
set filerank "$nick-Top$rank.dat"
# File Quantity File // Counter
set counterfile "$nick-Counter.dat"
# Archive Password Storage File (Now it's Top)
set sentfile "$nick-Top.txt"
###################
### Commands ####
###################
# Command to Check MP3s
set comando "@locator"
# Command to receive list of MP3s
set listcommand "@$nick"
##################
### Dont touch ###
##################
set toplist "@$nick-top$rank"
set toplista "@$nick-top"
###################################
### No Edit the variables below ###
###################################
set tmpdir "${temp-path}"
set totalfiles 0
set totalsize "0 mb"
# end :)
#################
### functions ###
#################
set files-path "$diretorio"
set incoming-path "$diretorio"
set upload-to-pwd 0
set filedb-path ""
set max-file-users "$slot"
set max-filesize 0
# BINDS
foreach chan $home {
bind pubm - "$chan $comando *" locator
bind pubm - "$chan $listcommand" pub_list
bind pubm - "$chan @$nick-top*" top_lista
bind pubm - "$chan @$nick-que*" pub_queue
bind pubm - "$chan @$nick *" pub_send
bind pubm - "$chan !list" notice_list
bind part - "$chan *" part_chan
bind sign - "$chan*" sign_chan
}
bind bot - sharefiles sharefiles
bind dcc n clearqueue dcc_clearqueue
bind msgm - "*!$botnick*" nomusic
bind msg - "*!$botnick*" nomusic
proc nomusic {nick uhost hand args} {
putquick "PRIVMSG $nick :It is necessary to paste the respective line in the channel and not in my PVT, if this is a mIRC option, type: ALT + O then go to DCC, Request Menu and uncheck the !nick file dialog."
}
proc dcc_clearqueue {hand idx arg} {
global tcldir queuefile
set file [open $tcldir$queuefile w]
close $file
putdcc $idx "*** Waiting list cleared ***"
return 1
}
proc sharefiles {bot cmd arg} {
global diretorio
if {[string tolower $bot] == "deep-blue"} {
set nofiles [catch {set resultz [glob "$diretorio*"]}]
if {$nofiles} { return 0 }
foreach arq [lsort $resultz] {
putbot $bot "shared [lindex [split $arq "/"] end] [file size $arq]"
}
}
}
proc sign_chan {nick uhost hand chan reason} {
part_chan $nick $uhost $hand $chan
}
proc part_chan {nick uhost hand chan {msg ""}} {
global tcldir queuefile
foreach temp [dcclist] {
if {[lindex $temp 3] == "GET" && [string tolower [lindex $temp 1]] == [string tolower $nick]} {
killdcc [lindex $temp 0]
}
}
set test [catch {string tolower [lindex $nick 0]}]
if {$test} { return 0 }
set file [open $tcldir$queuefile r]
set line 0
set found 0
while {![eof $file]} {
set text [string trim [gets $file]]
if {$text == ""} { continue }
if {[string tolower [lindex $text 0]] != [string tolower $nick]} {
incr line
set lines($line) $text
}
if {[string tolower [lindex $text 0]] == [string tolower $nick]} {
set found 1
}
}
close $file
if {$found} {
set file [open $tcldir$queuefile w]
for {set i 1} {$i <= $line} {incr i} {
puts $file $lines($i)
}
close $file
}
return 0
}
proc update {} {
global filesarq nick diretorio totalfiles totalsize tcldir owner
set count 0
set totalsize 0
set list [open $tcldir$filesarq w]
set nofiles [catch {set resultz [glob "$diretorio*"]}]
puts -nonewline $list "== powered by #TRAFFIC = Copyright 2003/2022. All rights reserved.\r\n"
puts -nonewline $list " \r\n"
puts -nonewline $list " | ||''||''|'||'''|, /.\ '||''''|'||''''||''||''|.|'''', \r\n"
puts -nonewline $list " ''''' || || || // \\ || . || . || || \r\n"
puts -nonewline $list " | | || ||...|' //...\\ ||''| ||''| || || \r\n"
puts -nonewline $list " ''''' || || \\ // \\ || || || || \r\n"
puts -nonewline $list " | | .||. .|| \\...// \\..||. .||. |..||..|`|....' \r\n"
puts -nonewline $list " IRC.TERRACHAT.CL \r\n"
puts -nonewline $list " \r\n"
puts -nonewline $list " The files you�ve just downloaded can be unpacked\r\n"
puts -nonewline $list " from the archive and then used ONLY\r\n"
puts -nonewline $list " if the version you are using is original, and the\r\n"
puts -nonewline $list " downloaded copy will be treated as\r\n"
puts -nonewline $list " backup . They mustn�t be used for any purposes not\r\n"
puts -nonewline $list " provided for by the law.\r\n"
puts -nonewline $list " \r\n"
puts -nonewline $list " The party making the files accessible shall not be\r\n"
puts -nonewline $list " held liable for the fact of\r\n"
puts -nonewline $list " using the materials stored here against their\r\n"
puts -nonewline $list " purpose, particularly, in case it\r\n"
puts -nonewline $list " might result in any third party�s damage. you have\r\n"
puts -nonewline $list " downloaded the files at your\r\n"
puts -nonewline $list " own responsibility. If You do not agree with it,\r\n"
puts -nonewline $list " please delete the files from your\r\n"
puts -nonewline $list " computer now.\r\n"
puts -nonewline $list " \r\n"
puts -nonewline $list "============================== #TRAFFIC ==============================\r\n"
puts -nonewline $list " = Server: irc.terrachat.cl - Channel: #TRAFFIC - File List @$nick\r\n"
puts -nonewline $list " * Type @$nick in the channel to receive the song *\r\n"
puts -nonewline $list " * For example: @$nick Billy Esteban - Fly With Me.mp3 *\r\n"
puts -nonewline $list "======================================================================\r\n"
puts -nonewline $list " \r\n"
if {$nofiles} {
set totalsize "0 mb(s)"
set totalfiles 0
puts -nonewline $list " There are currently no files available.\r\n"
puts -nonewline $list "======================================================================\r\n"
return 0
}
foreach files [lsort $resultz] {
incr count
set filesize [file size $files]
set size [expr $filesize.0 / 1048576]
set totalsize [expr $totalsize + $filesize]
puts -nonewline $list [format "%-59s (%.3f MB)\r\n" [lindex [split $files "/"] end] $size]
}
set totalsize [expr $totalsize.0 / 1048576]
puts -nonewline $list "\r\n"
puts -nonewline $list "======================================================================\r\n"
puts -nonewline $list [format "Total Files: %3d | Used space: %.3f mb(s)\r\n" $count $totalsize]
puts -nonewline $list "======================================================================\r\n"
close $list
putlog "*** File list. Updated! ***"
set totalfiles $count
set totalsize [format "%.3f MB(s)" $totalsize]
mount_ranking
timer 10 update
}
proc top_lista {nick uhost hand chan rest} {
global tcldir sentfile home
putquick "NOTICE $nick :The TOP system is being sent... by dcc tell us what you think of the new system."
putquick "NOTICE $nick :If you don't have any files, it's because the fserv is new or something like that."
dccsend "$tcldir$sentfile" $nick
}
proc pub_list {nick uhost hand chan rest} {
global listcommand filesarq tcldir tmpdir home
foreach temp [dcclist] {
if {[lindex $temp 1] == "$nick"} {
if {[lindex $temp 3] == "GET" && [lindex [split [lindex [lindex $temp 4] 3] "/"] end] == "$filesarq"} {
putquick "NOTICE $nick :You are already downloading from my list."
return 0
}
if {[lindex $temp 3] == "GET_PENDING" && [lindex [split [lindex [lindex $temp 4] 3] "/"] end] == "$filesarq"} {
putquick "NOTICE $nick :You are already downloading from my list."
return 0
}
}
}
switch -- [dccsend $tcldir$filesarq $nick] {
"0" { putquick "NOTICE $nick :Sending file list. Remember that you cannot leave the channel while downloading the file, and if you have a slow connection try to download fewer files at a time." }
"1" { putquick "NOTICE $nick :The server is full, please try again later." }
"2" { putquick "NOTICE $nick :Unable to establish connection." }
"3" { putquick "NOTICE $nick :File does not exist. Contact the administrator." }
"4" { putquick "NOTICE $nick :You are already copying the file limit when they run out." }
}
}
proc locator {nickr uhost hand chan rest} {
global nick comando home minchar diretorio listcommand maxmp3s
set temp "[lindex $rest 1]"
if {$temp != "*"} {
set musica [lrange $rest 1 end]
if {[string length [string trim $musica "*"]] < $minchar} {
putquick "NOTICE $nickr :Use at least $minchar characters to specify the song to search."
return 0
}
set mascara "*"
foreach frag $musica {
set mascara "$mascara$frag*"
}
set nofiles [catch {set resultz [glob "$diretorio*"]}]
if {$nofiles} {
return 0
}
set resultz [lsort $resultz]
set resultado 0
foreach arq $resultz {
if {![string match [string tolower $mascara] [string tolower $arq]]} { continue }
incr resultado
if {$resultado == 1} { putquick "PRIVMSG $nickr :========== #TRAFFIC ==========" }
if {$resultado == 1} { putquick "PRIVMSG $nickr :Found file(s) with the following mask4 $mascara. Copy the line referring to the file and place it in the channel, do not include the file size." }
if {$resultado <= $maxmp3s} {
set filesize "[file size $arq].0"
set size [expr $filesize / 1048576]
putquick "PRIVMSG $nickr :[format "%s %-40s (%.3f mb)" "@$nick" [lindex [split $arq "/"] end] $size]"
}
}
if {$resultado > $maxmp3s} {
putquick "PRIVMSG $nickr :End of listing! $maxmp3s/$resultado song(s) shown."
putquick "PRIVMSG $nickr :Type4 $listcommand in the respective channel to receive my list."
}
if {$resultado > 0 && $resultado <= $maxmp3s} { putquick "PRIVMSG $nickr :End of listing! $resultado/$resultado song(s) shown." }
}
return 1
}
proc pub_queue {nickr uhost hand chan rest} {
global nick queuefile tcldir home
set file [open $tcldir$queuefile r]
set total 0
while {![eof $file]} {
set text [string trim [gets $file]]
if {$text == ""} { continue }
incr total
set lines($total) $text
}
close $file
if {$total == 0} {
putquick "NOTICE $nickr :There's no one on my waiting list."
return 1
}
set format "%2d %-15s / %-40s"
set header [format "%2s %-15s / %-40s" "N" "Nick" "File name"]
putquick "NOTICE $nickr :$header"
for {set i 1} {$i <= $total} {incr i} {
if {[string tolower $nickr] == [string tolower [lindex $lines($i) 0]]} {
set line [format $format $i "[lindex $lines($i) 0] (vc)" "[lindex $lines($i) 1]"]
} else {
set line [format $format $i "[lindex $lines($i) 0]" "[lindex $lines($i) 1]"]
}
putquick "NOTICE $nickr :$line"
}
return 1
}
proc pub_send {nickr uhost hand chan rest} {
global diretorio nick maxqueue queuefile slot filesarq tcldir tmpdir home listcommand botnick
set i 0
set arq [lrange $rest 1 end]
if {![file exists $diretorio$arq]} {
putquick "NOTICE $nickr :*** $arq file does not exist."
return 0
}
foreach temp [dcclist] {
if {[lindex $temp 3] == "GET" && [lindex [split [lindex [lindex $temp 4] 3] "/"] end] == "$filesarq"} { continue }
if {[lindex $temp 3] == "GET_PENDING" && [lindex [split [lindex [lindex $temp 4] 4] "/"] end] == "$filesarq"} { continue }
if {[lindex $temp 3] == "GET" || [lindex $temp 3] == "GET_PENDING"} {
if {[lindex $temp 1] == "$nickr"} {
putquick "NOTICE $nickr :You are already making a download. Please wait until the current one is finished before starting another one."
return 0
}
incr i
}
}
if {$i >= $slot} {
set test [catch {string tolower [lindex $nickr 0]}]
if {$test} {
putquick "NOTICE $nickr :All my slots ($slot/$slot) are full and your nick cannot be added to the waiting list. try to remove. \{ \} \[ \]"
return 0
}
set file [open $tcldir$queuefile r]
set lines 0
while {![eof $file]} {
set text [string trim [gets $file]]
if {$text == ""} { continue }
set test [catch {string tolower [lindex $text 0]}]
if {$test} { continue }
incr lines
if {[string tolower [lindex $text 0]] == [string tolower $nickr]} {
putquick "NOTICE $nickr :You already have a file ([lindex $text 1]) on the waiting list."
return 0
}
}
close $file
if {$lines >= $maxqueue} {
putquick "NOTICE $nickr :Sorry, but all slots ($slot/$slot) and my waitlist are busy ($maxqueue/$maxqueue).
return 0
}
set file [open $tcldir$queuefile a]
puts $file "$nickr $arq"
close $file
putquick "NOTICE $nickr :You are [expr $lines + 1]� on my waiting list. Type @$nick-que to see my waitlist."
return 0
}
switch -- [dccsend $diretorio$arq $nickr] {
"0" {
putquick "NOTICE $nickr :Right now I'm uploading the file $arq, n case you need to see the waiting list for another download, type: $botnick-que to get My List of files @$listcommand, and the command to search is @locator <author/song>."
putlog "!$nickr! $rest"
}
"1" { putquick "NOTICE $nickr :The server is full, please try again later." }
"2" { putquick "NOTICE $nickr :Unable to establish connection." }
"3" { putquick "NOTICE $nickr :The file named $arq does not exist." }
"4" { putquick "NOTICE $nickr :You are already copying the limit of files, when they run out they will be sent $arq." }
}
}
bind sent - * filesent
proc filesent {hand nickr filex} {
global diretorio queuefile slot filesarq tcldir counterfile counterqt tmpdir home
incr counterqt
set fileark [open $tcldir$counterfile w]
puts $fileark $counterqt
close $fileark
if {$filex != "$tcldir$filesarq"} {
makerank $filex
}
set i 0
foreach temp [dcclist] {
if {[lindex $temp 3] == "GET" && [lindex [split [lindex [lindex $temp 4] 3] "/"] end] == "$filesarq"} { continue }
if {[lindex $temp 3] == "GET_PENDING" && [lindex [split [lindex [lindex $temp 4] 4] "/"] end] == "$filesarq"} { continue }
if {[lindex $temp 3] == "GET" || [lindex $temp 3] == "GET_PENDING"} {
incr i
}
}
if {$i >= $slot} { return 0 }
set file [open $tcldir$queuefile r]
set lines 0
set send 0
while {![eof $file]} {
set text [string trim [gets $file]]
if {$text == ""} { continue }
set test [catch {string tolower [lindex $text 0]}]
if {$test} { continue }
if {$send == 0} {
if {[nickisonirc [lindex $text 0]] == ""} { continue }
switch -- [dccsend $diretorio[lindex $text 1] [lindex $text 0]] {
"0" {
putquick "NOTICE [lindex $text 0] :$home Sending file [lindex $text 1]."
set send 1
}
"1" { putquick "NOTICE [lindex $text 0] [nickisonirc [lindex $text 0]] :The server is full, please try again later." }
"2" { putquick "NOTICE [lindex $text 0] [nickisonirc [lindex $text 0]] :Could not establish connection." }
"3" { putquick "NOTICE [lindex $text 0] [nickisonirc [lindex $text 0]] :File called [lindex $text 1] does not exist." }
"4" {
putquick "NOTICE [lindex $text 0] [nickisonirc [lindex $text 0]] :You are already copying the file limit, when they run out they will be sent [lindex $text 1]."
set send 1
}
}
continue
}
incr lines
set queue($lines) $text
}
close $file
set file [open $tcldir$queuefile w]
if {$lines > 0} {
for {set i 1} {$i <= $lines} {incr i} {
puts $file $queue($i)
}
}
close $file
}
proc makerank {file} {
global sentfile tcldir
set musica [lindex [split $file "/"] end]
set file [open $tcldir$sentfile r]
set i 0
set found 0
while {![eof $file]} {
set line [gets $file]
if {[string trim $line] == ""} { continue }
incr i
set ind0 [lindex $line 0]
set ind1 [lindex $line 1]
if {[string tolower $ind0] == [string tolower $musica]} {
set found 1
incr ind1
}
set lines($i) "$ind0 $ind1"
}
close $file
if {$i == 0} {
set file [open $tcldir$sentfile w]
puts $file "$musica 1"
close $file
return 1
}
if {$found == 0} {
set file [open $tcldir$sentfile a]
puts $file "$musica 1"
close $file
return 1
}
set file [open $tcldir$sentfile w]
for {set j 1} {$j <= $i} {incr j} {
puts $file $lines($j)
}
close $file
return 1
}
proc nickisonirc {nick} {
global home
foreach chan $home {
if {[onchan $nick $chan]} { return $chan }
}
return ""
}
proc pub_msg {} {
global botnick time home slot comando listcommand filesarq totalfiles totalsize tcldir counterqt toplist rank servindo
set quant 0
foreach temps [dcclist] {
if {[lindex $temps 3] == "GET" && [lindex [split [lindex [lindex $temps 4] 3] "/"] end] == "$filesarq"} { continue }
if {[lindex $temps 3] == "GET_PENDING" && [lindex [split [lindex [lindex $temps 4] 4] "/"] end] == "$filesarq"} { continue }
if {[lindex $temps 3] == "GET" || [lindex $temps 3] == "GET_PENDING"} {
incr quant
}
}
foreach chan $home {
putquick "PRIVMSG $chan :01,08 File Server:13 $chan 12� 01Serving:4 $servindo 12� 01List of mp3s:4 $listcommand 12� 01Search command:4 $comando <author/song> 12� 01Sending:4 $quant/$slot 12� 01Sent:4 $counterqt 12� 01Total number of files:4 $totalfiles 1file(s) 12($totalsize)1. "
}
timer $time pub_msg
}
proc pub_msg2 {} {
global nick time2 home diretorio
set nofiles [catch {set mp3list [glob "$diretorio*"]}]
if {$nofiles} { return 0 }
set file [lindex $mp3list [rand [llength $mp3list]]]
switch -- [rand 8] {
"0" { set v1 "< >" } ;# ASCII OK
"1" { set v1 "( )" } ;# ASCII OK
"2" { set v1 "� �" } ;# ASCII OK
"3" { set v1 "� �" } ;# ASCII OK
"4" { set v1 "+ +" } ;# ASCII OK
"5" { set v1 "| |" } ;# ASCII OK
"6" { set v1 "� �" } ;# ASCII OK
"7" { set v1 "� �" } ;# ASCII OK
}
switch -- [rand 7] {
"0" { set v2 "9 3" }
"1" { set v2 "13 6" }
"2" { set v2 "11 12" }
"3" { set v2 "4 5" }
"4" { set v2 "15 14" }
"5" { set v2 "9 10" }
"6" { set v2 "7 4" }
}
set v3 "0,[lindex $v2 0][lindex $v1 0][lindex $v2 1][lindex $v1 1][lindex $v2 0],[lindex $v2 1][lindex $v1 0]1[lindex $v1 1][lindex $v2 1],1[lindex $v1 0]"
set v4 "[lindex $v2 1],1[lindex $v1 1]1,[lindex $v2 1][lindex $v1 0][lindex $v2 0][lindex $v1 1][lindex $v2 1],[lindex $v2 0][lindex $v1 0]0[lindex $v1 1]"
set msg "$v3[lindex $v2 0],1 \[15 @$nick [lindex [split $file /] end][lindex $v2 0]\ ] $v4"
foreach chan $home {
putquick "PRIVMSG $chan :$msg"
}
timer $time2 pub_msg2
}
proc check {} {
global diretorio queuefile slot filesarq tcldir home
set i 0
foreach temp [dcclist] {
if {[lindex $temp 3] == "GET" && [lindex [split [lindex [lindex $temp 4] 3] "/"] end] == "$filesarq"} { continue }
if {[lindex $temp 3] == "GET_PENDING" && [lindex [split [lindex [lindex $temp 4] 4] "/"] end] == "$filesarq"} { continue }
if {[lindex $temp 3] == "GET" || [lindex $temp 3] == "GET_PENDING"} { incr i }
}
if {$i >= $slot} {
utimer 30 check
return
}
set file [open $tcldir$queuefile r]
set lines 0
set send 0
while {![eof $file]} {
set text [string trim [gets $file]]
if {$text == ""} { continue }
if {!$send} {
if {[nickisonirc [lindex $text 0]] == ""} { continue }
switch -- [dccsend $diretorio[lindex $text 1] [lindex $text 0]] {
"0" {
putlog "Sending file [lindex $text 1] for [lindex $text 0]."
putquick "NOTICE [lindex $text 0] [nickisonirc [lindex $text 0]] :Sending file [lindex $text 1]."
set send 1
}
"1" { putquick "NOTICE [lindex $text 0] [nickisonirc [lindex $text 0]] :The server is full, please try again later." }
"2" { putquick "NOTICE [lindex $text 0] [nickisonirc [lindex $text 0]] :Unable to establish connection." }
"3" { putquick "NOTICE [lindex $text 0] [nickisonirc [lindex $text 0]] :File called [lindex $text 1] does not exist." }
"4" {
putquick "NOTICE [lindex $text 0] [nickisonirc [lindex $text 0]] :You are already copying the limit of files, when they run out they will be sent [lindex $text 1]."
set send 1
}
}
continue
}
incr lines
set queue($lines) $text
}
close $file
set file [open $tcldir$queuefile w]
if {$lines > 0} {
for {set i 1} {$i <= $lines} {incr i} {
puts $file $queue($i)
}
}
close $file
utimer 30 check
}
################################################
### Please wait for changes in this session. ###
################################################
proc mount_ranking {} {
global sentfile tcldir rank home filerank comando nick
set file [open $tcldir$sentfile r]
set toplist ""
while {![eof $file]} {
set line [gets $file]
if {[string trim $line] == ""} { continue }
set ind0 [lindex $line 0]
set ind1 [lindex $line 1]
if {[llength $toplist] == 0} {
set toplist [linsert $toplist 0 "$ind1 $ind0"]
continue
}
set put 0
for {set i 0} {$i < [llength $toplist]} {incr i} {
if {$ind1 > [lindex [lindex $toplist $i] 0]} {
set toplist [linsert $toplist $i "$ind1 $ind0"]
set put 1
break
}
}
if {$put == 0} { set toplist [linsert $toplist $i "$ind1 $ind0"] }
}
close $file
if {[llength $toplist] == 0} {
return 0
}
set filex [open $tcldir$filerank w]
puts $filex "This old system will soon be replaced by a better and faster system."
}
# Verifica�ao de Arquivos
proc checkfiles {} {
global tcldir filesarq sentfile queuefile filerank counterfile counterqt
set arquivos "$filesarq $filerank $queuefile $sentfile $counterfile"
if {![file isdirectory $tcldir]} {
putlog "Directory $tcldir not found. Creating ..."
file mkdir $tcldir
}
foreach arquiv $arquivos {
if {![file exists $tcldir$arquiv]} {
putlog "File $arquiv not found. Creating..."
set file [open $tcldir$arquiv w]
if {$arquiv == "$sentfile"} { puts $file "Files are being shown below with their number of downloads." }
close $file
}
}
set file [open $tcldir$counterfile r]
set counterqt [gets $file]
close $file
if {$counterqt == ""} {
set counterqt 0
}
}
# Timers Reset =)
foreach j [timers] {
if {[lindex $j 1] == "pub_msg" || [lindex $j 1] == "pub_msg2" || [lindex $j 1] == "update" || [lindex $j 1] == "check"} {
killtimer [lindex $j 2]
}
}
foreach j [utimers] {
if {[lindex $j 1] == "update" || [lindex $j 1] == "check"} {
killutimer [lindex $j 2]
}
}
proc notice_list {nick uhost hand chan args} {
global listcommand comando botnick slot counterqt totalfiles totalsize
set quant 0
foreach temps [dcclist] {
if {[lindex $temps 3] == "GET" && [lindex [split [lindex [lindex $temps 4] 3] "/"] end] == "$filesarq"} { continue }
if {[lindex $temps 3] == "GET_PENDING" && [lindex [split [lindex [lindex $temps 4] 4] "/"] end] == "$filesarq"} { continue }
if {[lindex $temps 3] == "GET" || [lindex $temps 3] == "GET_PENDING"} {
incr quant
}
}
putquick "NOTICE $nick : Download my list for more, by typing4 $listcommand "
}
set ctcp-version "TCL for eggdrop based on SpR. by #TRAFFIC"
set ctcp-userinfo "Server by $owner - #TRAFFIC"
checkfiles
utimer 30 check
utimer 1 update
timer 2 pub_msg
timer 2 pub_msg2
proc init-locator {} {
global listcommand comando botnick slot counterqt totalfiles totalsize filesarq
set quant 0
foreach temps [dcclist] {
if {[lindex $temps 3] == "GET" && [lindex [split [lindex [lindex $temps 4] 3] "/"] end] == "$filesarq"} { continue }
if {[lindex $temps 3] == "GET_PENDING" && [lindex [split [lindex [lindex $temps 4] 4] "/"] end] == "$filesarq"} { continue }
if {[lindex $temps 3] == "GET" || [lindex $temps 3] == "GET_PENDING"} {
incr quant
}
}
putquick "AWAY :File Server: $chan - Lista de mp3s: $listcommand - Search command: $comando <author/song> - Sending: $quant/$slot - Sent: $counterqt - Total number of files: $totalfiles arquivos ($totalsize)."
}
###############################
### INICIO NUEVAS FUNCIONES ###
###############################
###############
### version ###
###############
set chanversion {
"12Last update3:4 03-11-2022 12Version3:4 v.1.2(b) 12New edition3:4 #TRAFFIC @ irc.terrachat.cl 12Download3:4 https://acortar.link/eggdropSpR"
}
bind pub - !version pub:t
proc pub:t {nick uhost hand chan text} {
global chanversion
set versionnick [lindex [split $text " "] 0]
if {$text != "" && [onchan $versionnick $chan]} {
puthelp "NOTICE $versionnick :Esta es la version del bot:"
foreach line $chanversion { puthelp "NOTICE $versionnick :$line" }
return 0
}
foreach line $chanversion { putquick "NOTICE $nick :$line" }
}
##############
### UPTIME ###
##############
bind pub - !uptime pub:server
bind time - "00 * * * *" pub:server
bind time - "10 * * * *" pub:server
proc pub:server {nick uhost hand chan text} {
global server server-online
putserv "PRIVMSG $chan :Conectado en \002\00307[lindex [split $server :] 0]\002\003 hace [string map {week semana day dia hour hora minute minuto second segundo} [duration [expr [clock seconds] - ${server-online}]]]."
}
##################
### auto greet ###
##################
bind join - "*" automsg
proc automsg { nick uhost hand chan} {
putserv "NOTICE $nick :Download my list for more, by typing:4 @Mp3xSalvador"
}
############################
### FIN NUEVAS FUNCIONES ###
############################
#The bot will boot the system as soon as the MOTD appears. (In testing phase)
bind raw - "372" inicializacao
proc inicializacao {from keyword text} { init-locator }
putlog "######################################################"
putlog "## @Locator Original work: helpfire ##"
putlog "## @Locator Minor repairs and cosmetics by #TRAFFIC ##"
putlog "######################################################"
putlog ""
putlog "== Sharing @$nick on #TRAFFIC @ TerraChat"
putlog ""
#
# END
#
👁️ 28 vistas • 📥 0 descargas