elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Sigue las noticias más importantes de seguridad informática en el Twitter! de elhacker.NET


+  Foro de elhacker.net
|-+  Programación
| |-+  Scripting
| | |-+  tcl de radio de shoucast
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: tcl de radio de shoucast  (Leído 1,336 veces)
Cvri7a

Desconectado Desconectado

Mensajes: 1


Ver Perfil
tcl de radio de shoucast
« en: 16 Febrero 2024, 20:25 pm »

Estimados buenas solicito su ayuda con esta tcl de radio me sale dichos mensajes en la party line del bot

<DjBot> [14:29:00] SHOUTCast: Comprobando Conexión con el Servidor de Radio...
<DjBot> [14:29:01] Tcl error [isonline]: can't read "curhigh": no such variable

no se como darle solucion tampoco responde a los comandos que tiene dicha tcl haber si alguien me ayuda por favor me tomo tiempo traducirla


#++++++++++++++#
##########[(01)] CONFIGURACIONES
#++++++++++++++#
set RadioCmd "!"
set CMDerror "4ERROR: 1Comando INCOMPLETO, usa 12\u21db7"
set RadioChans "#Peru #AmigosChat #Latinos"
set CabinaDJ "#Dj-Amigos"
#set telebot "TG"
set RadioLogo "10\[10|1R12adio7Latido Musical10|10\]"
set RadioSlogan "31La 32Música 33Que T34e Conecta!!!"
set RadioNetUrl "\002\00314NO DISPONIBLE\002"
set RadioUrl "https://latidomusical.online"
set RadioApp "https://play.google.com/store/apps/details?id=laradio.online.radiolatidomusical"
set RadioWinamp "https://server.streamcasthd.com/cp/links.php?p=8196&m=pls"
set RadioRepro "https://server.streamcasthd.com:7097/"
set msgsockerror "5LINUX2:1 SERVIDOR 3SHOUTCast1 NO ESTÁ CONECTADO."
set RadioTipo "3SHOUTCast:2"
set IPdjbot "0.0.0.0.0"
set RadioAdmin "user"
set RadioVersion "2.0.5"
set RadioTCL "TCL para Radio Latido Musical"
set RadioIgnore "3"
set RadioPermIgnore "0"
set RadioPlus "+"
set RadioLess "-"
set alertadmin ""
set doalertadmin "1"
set announce "1"
set urltopic "1"
set ctodjc "1"
set tellsongs "1"
set tellusers "1"
set tellbitrate "1"
set advertise "1"
set advertiseonlyifonline "1"
set style "1"
set flimit 15
set div "/"
set notice 1
set playlist(file) "/home/LatidoMusical/autodj/autodj.lst"



#+++++++++++++++ TIEMPOS
### Bind Radio Aviso
bind time - "00 00 * * *" Radio:Aviso
bind time - "03 03 * * *" Radio:Aviso
bind time - "05 07 * * *" Radio:Aviso
bind time - "08 13 * * *" Radio:Aviso
bind time - "05 19 * * *" Radio:Aviso

### DJ ONLINE #######################
bind time - "* * * * *" isonline
### AUTODJ ON #############################
bind time - "00 * * * *" Radio:AutoDJon
bind time - "30 * * * *" Radio:AutoDJon
bind time - "05 * * * *" Radio:AutoDJon
### Bind Time AVISO 4h#####################
bind time - "05 04 * * *" advertise
bind time - "00 08 * * *" advertise
bind time - "05 12 * * *" advertise
bind time - "30 16 * * *" advertise
bind time - "05 20 * * *" advertise
#bind time - "?0 * * * *" advertise
### Bind Time HORARIO ####################
#bind time - "15 * * * *" radio:horario
#bind time - "30 * * * *" radio:horario
### Bind Time PUBLICIDAD 3h###############
bind time - "00 04 * * *" radio:publicidad
bind time - "05 07 * * *" radio:publicidad
bind time - "30 10 * * *" radio:publicidad
bind time - "05 13 * * *" radio:publicidad
bind time - "50 16 * * *" radio:publicidad
### Bind Time VOTACION ####################
#bind time - "15 * * * *" votacion
### Bind Time CAMBIO DE NICK ##############
bind nick D * djnickchange

#++++++++++++++#
##########[(03)] ARCHIVOS
#++++++++++++++#

set dirname "scripts/LatidoMusical"

if {[file exists $dirname] == 0} {
   file mkdir $dirname
}

#+++++++++++++++ IP
set streamip "scripts/LatidoMusical/ip.txt"
if {![file exists $streamip]} {putlog "LatidoMusical: No se encuentra al archivo, creando $streamip"
   set file [open $streamip w]; close $file}
   set temp [open $streamip r]; set streamip [gets $temp]; close $temp
#+++++++++++++++ IP
set ipdj "scripts/LatidoMusical/ipdj.txt"
if {![file exists $ipdj]} {putlog "LatidoMusical: No se encuentra al archivo, creando $ipdj"
   set file [open $ipdj w]; close $file}
   set temp [open $ipdj r]; set streamip [gets $temp]; close $temp
#+++++++++++++++ PUERTO
set streamport "scripts/LatidoMusical/port.txt"
if {![file exists $streamport]} {putlog "LatidoMusical - El Archivo NO EXISTE. Creando ARCHIVO -> $streamport."
   set file [open $streamport w]; close $file}
   set temp [open $streamport r]; set streamport [gets $temp]; close $temp
#+++++++++++++++ PASSWORD
set streampass "scripts/LatidoMusical/passwd.txt"
if {![file exists $streampass]} {putlog "LatidoMusical - El Archivo NO EXISTE. Creando ARCHIVO -> $streampass."
   set file [open $streampass w]; close $file}
   set temp [open $streampass r]; set streampass [gets $temp]; close $temp
#+++++++++++++++ ONLINE
set streamstatus "scripts/LatidoMusical/online.txt"
if {![file exists $streamstatus]} {putlog "LatidoMusical - El Archivo NO EXISTE. Creando ARCHIVO -> $streamstatus."
   set file [open $streamstatus w]; close $file}
   set temp [open $streamstatus r]; set streamstatus [gets $temp]; close $temp
#+++++++++++++++ DJ
set dj "scripts/LatidoMusical/dj.txt"
if {![file exists $dj]} {putlog "LatidoMusical - El Archivo NO EXISTE. Creando ARCHIVO -> $dj."
   set file [open $dj w]; adduser djs; chattr djs +D; putlog "SHOUTCast: Creando Usuario para djs"; close $file}
   set temp [open $dj r]; set dj [gets $temp]; close $temp
#+++++++++++++++ PETICIONES
set peticionestxt "scripts/LatidoMusical/peticiones.txt"
if {![file exists $peticionestxt]} {putlog "LatidoMusical - El Archivo NO EXISTE. Creando ARCHIVO -> $peticionestxt."
   set file [open $peticionestxt w]; close $file;}
   set temp [open $peticionestxt r]; set peticiones [gets $temp]; close $temp
#+++++++++++++++ CIUDAD
set ciudad "scripts/LatidoMusical/ciudad.txt"
if {![file exists $ciudad]} {putlog "LatidoMusical - El Archivo NO EXISTE. Creando ARCHIVO -> $ciudad."
   set file [open $ciudad w]; close $file}
   set temp [open $ciudad r]; set ciudad  [gets $temp]; close $temp
#+++++++++++++++ BANIP
set banip "scripts/LatidoMusical/banip.txt"
if {![file exists $banip]} {putlog "LatidoMusical - El Archivo NO EXISTE. Creando ARCHIVO -> $banip."
   set file [open $banip w]; close $file}
   set temp [open $banip r]; set banip [gets $temp]; close $temp
#+++++++++++++++ URL
set RadioUrl "scripts/LatidoMusical/link.txt"
if {![file exists $RadioUrl]} {putlog "LatidoMusical - El Archivo NO EXISTE. Creando ARCHIVO -> $RadioUrl."
   set file [open $RadioUrl w]; close $file}
   set temp [open $RadioUrl r]; set RadioUrl [gets $temp]; close $temp
#+++++++++++++++ CONTADOR
set Fcontador "scripts/LatidoMusical/Hcounter.txt"
if {![file exists $Fcontador]} {putlog "LatidoMusical - El Archivo NO EXISTE. Creando ARCHIVO -> $Fcontador"
   set file [open $Fcontador w]; close $file}
   set temp [open $Fcontador r]; set cfile [gets $temp]; close $temp
#+++++++++++++++ AUTODJ
set autodj "scripts/LatidoMusical/autodj.txt"
if {![file exists $autodj]} {putlog "LatidoMusical - El Archivo NO EXISTE. Creando ARCHIVO -> $autodj."
   set file [open $autodj w]; puts $temp "0"; close $file}
   set temp [open $autodj r]; set autodj [gets $temp]; close $temp
#+++++++++++++++ TELEGRAM
set telegram "scripts/LatidoMusical/telegram.txt"
if {![file exists $telegram]} {putlog "LatidoMusical - El Archivo NO EXISTE. Creando ARCHIVO -> $telegram."
   set file [open $telegram w]; puts $temp "0"; close $file}
   set temp [open $telegram r]; set telegram [gets $temp]; close $temp

#+++++++++++++++ CANALES
#set canalez "scripts/LatidoMusical/canales.txt"
#if {![file exists $canales]} {putlog "LatidoMusical - El Archivo NO EXISTE. Creando ARCHIVO -> $canales."
#   set file [open $canales w]; puts $temp "0"; close $file}
#   set temp [open $canales r]; set canales [gets $temp]; close $temp


#++++++++++++++#
##########[(02)] BINDS
#++++++++++++++#
#+++++++++++++++ ADMINS

bind pub n ${RadioCmd}ip Radio:Ip
bind pub n ${RadioCmd}puerto Radio:Puerto
bind pub n ${RadioCmd}password Radio:Passwd
bind pub n ${RadioPlus}dj Radio:DJadd
bind pub n ${RadioLess}dj Radio:DJdel
bind pub n ${RadioPlus}vipuser proc:vipuser
bind pub n ${RadioLess}vipuser Radio:Passwd
bind pub n ${RadioPlus}admin Radio:AdminAdd
bind pub n ${RadioLess}admin Radio:AdminDel
bind pub n ${RadioCmd}join Radio:Join
bind pub n ${RadioCmd}part Radio:Part
bind pub n ${RadioCmd}rehash Radio:Rehash
bind pub n ${RadioCmd}restart Radio:Restart
bind pub n ${RadioCmd}reset Radio:Reset
bind pub n ${RadioCmd}topic Radio:Topic
bind pub n ${RadioCmd}RadioUrl dj:RadioUrl

#++++++++++++++ DJS
bind pub nD ${RadioCmd}serdj Radio:Serdj
bind pub nD ${RadioCmd}noserdj Radio:NoSerdj
bind pub nD ${RadioCmd}oyentes Radio:Oyentes
bind pub nD ${RadioCmd}abre Radio:PedidosON
bind pub nD ${RadioCmd}cierra Radio:PedidosOFF
bind pub nD ${RadioCmd}djs Radio:ListaDJs
bind pub nD ${RadioCmd}vipusers proc_listausuarios
bind pub nD ${RadioPlus}vipuser proc:vipuser
bind pub nD ${RadioCmd}datosradio Radio:Datos
bind pub nD ${RadioCmd}estado Radio:Estado
bind pub nD ${RadioCmd}ignore proc:ignore
bind pub nD ${RadioCmd}delignore proc:delignore
bind pub nD ${RadioCmd}anuncio advertise
bind pub nD ${RadioCmd}spot radio:publicidad
bind pub nD ${RadioCmd}programa radio:horario
bind pub nD ${RadioCmd}canales Radio:Canales 
bind pub nD ${RadioCmd}comandosdj Radio:AyudaDJ
bind pub nD ${RadioCmd}radio Radio:OnOFF
bind pub nD ${RadioCmd}conexion Radio:Conexion

#+++++++++++++++ USUARIOS
bind pub - ${RadioCmd}enlace Radio:URL
bind pub - ${RadioCmd}link Radio:URL
bind pub - ${RadioCmd}radio pub:radio
bind pub - ${RadioCmd}tema Radio:Playing
bind pub - ${RadioCmd}dj radio:DJonline
bind pub - ${RadioCmd}peticiones pub_statuspeticiones
bind pub - ${RadioCmd}pido Radio:Pedido
bind pub - ${RadioCmd}saludos pub_greet
bind pub - ${RadioCmd}comandos
bind pub D ${RadioCmd}ultimas pub_lastsongs
bind pub - ${RadioCmd}ayuda Radio:AyudaUsuario
bind pub - ${RadioCmd}winamp winamp
bind pub - ${RadioCmd}reproductor reproductor
bind pub - ${RadioCmd}app Radio:App
bind pub - ${RadioCmd}votacion votacion
#bind pub - ${RadioCmd}horario horarios

#++++++++++++++#
##########[(04)] NUCLEO
#++++++++++++++#

proc shrink { calc number string start bl} { return [expr [string first "$string" $bl $start] $calc $number] }
proc status { } {
global streamip streamport streampass msgsockerror CabinaDJ
   set temp [open scripts/LatidoMusical/passwd.txt r]; set streampass [gets $temp]; close $temp
   set temp [open scripts/LatidoMusical/port.txt r]; set streamport [gets $temp]; close $temp
if {[catch {set sock [socket $streamip $streamport] } sockerror]} {
   putlog "error: $sockerror"
   return 0 } else {
   puts $sock "GET /admin.cgi?sid=1&pass=$streampass&mode=viewxml&page=0 HTTP/1.1"
   puts $sock "User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9)"
   puts $sock "Host: $streamip"
   puts $sock "Connection: close"
   puts $sock ""
   flush $sock
   while {[eof $sock] != 1} {
   set bl [gets $sock]
if { [string first "standalone" $bl] != -1 } {
   set streamstatus [string range $bl [shrink + 14 "<STREAMSTATUS>" 0 $bl] [shrink - 1 "</STREAMSTATUS>" 0 $bl]]
}}
   close $sock
}
if {[info exists streamstatus]} {
if { $streamstatus == "1" } { return 1 } else { return 0 }
} else { return 0 }}

###### (04) IP/PORT/PASSWORD
### IP #####################
proc Radio:Ip { nick uhost hand chan text } {
global botnick CabinaDJ RadioCmd streamip CMDerror
   set temp [open scripts/LatidoMusical/ip.txt r]; set streamip [gets $temp]; close $temp
   set ipradio [lindex $text 0]
   if {$ipradio == ""} {putserv "PRIVMSG $chan :$CMDerror ${RadioCmd}ip <ip>";return}
   if {$streamip == "$ipradio"} {putserv "PRIVMSG $chan :7$nick: 1Ya Existe el IP12 $ipradio 1en mi BASE de DATOS.";return}
   set temp [open "scripts/LatidoMusical/ip.txt" w+]; puts $temp $streamip; close $temp
   putserv "PRIVMSG $chan :4\u2714 1Configurando IP del Servidor RADIO 12\u25BA7 $ipradio"
   putlog "4\u2714 1Configurando IP del Servidor RADIO 12\u25BA7 $ipradio"
   rehash
   save
   return 0
}

### PORT #####################
proc Radio:Puerto { nick uhost hand chan text } {
global botnick CabinaDJ RadioCmd CMDerror
set streamport [lindex $text 0]
   if {$text == ""} {putserv "PRIVMSG $chan :$CMDerror ${RadioCmd}puerto <puerto>";return}
   set streamport [lindex $text 0]; set temp [open "scripts/LatidoMusical/port.txt" w+]; puts $temp $streamport; close $temp
   putserv "PRIVMSG $CabinaDJ :Configurando Servidor LatidoMusical - PUERTO: $streamport"
   putlog "Configurando Servidor SHOUTcast- Puerto: $streamport"
   rehash
   save
   return 0
}

### PASSWORD #####################
proc Radio:Passwd { nick uhost hand chan text } {
global botnick CabinaDJ RadioCmd CMDerror
set streampass [lindex $text 0]
   if {$text == ""} {putserv "PRIVMSG $chan :$CMDerror ${RadioCmd}password <password>";return}
   set streampass [lindex $text 0]; set temp [open "scripts/LatidoMusical/passwd.txt" w+]; puts $temp $streampass; close $temp
   putserv "PRIVMSG $CabinaDJ :Configurando Servidor LatidoMusical - PASSWORD: $streampass"
   putlog "Configurando Servidor SHOUTcast- IP: $streampass"
   rehash
   return 0                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
}

### RADIOLINK #####################
proc dj:RadioUrl { nick uhost hand chan text } {
global botnick CabinaDJ RadioCmd CMDerror
set RadioUrl [lindex $text 0]
   if {$text == ""} {putserv "PRIVMSG $chan :$CMDerror ${RadioCmd}RadioUrl <enlace>";return}
   set RadioUrl [lindex $text 0]; set temp [open "scripts/LatidoMusical/link.txt" w+]; puts $temp $RadioUrl; close $temp
   putserv "PRIVMSG $CabinaDJ :Configurando Link LatidoMusical - Link de radio: $RadioUrl"
   putlog "Configurando Servidor SHOUTcast- IP: $RadioUrl"
   rehash
   return 0                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
}

#++++++++++++++#
##########[(06)] PROCESOS
#++++++++++++++#
#+++++++++++++++ BOT
proc Radio:Rehash { nick uhost hand chan arg } {
global botnick CabinaDJ
if {([lsearch -exact [string tolower $CabinaDJ] [string tolower $chan]] != -1) || ($CabinaDJ == "")} {
   putserv "privmsg $CabinaDJ :12\u27561$nick 12\U21f6 4Actualizando ARCHIVOS..."; rehash;save;return}}
#+++++++++++++++ RESTART
proc Radio:Restart { nick uhost hand chan arg } {
global botnick CabinaDJ
   if {([lsearch -exact [string tolower $CabinaDJ] [string tolower $chan]] != -1) || ($CabinaDJ == "")} {
   putserv "privmsg $CabinaDJ :12\u27561$nick 12\u21c9 4Reiniciando SISTEMA..."; utimer 10 [list save]; utimer 11 [list rehash]; utimer 12 [list restart];return}}
#+++++++++++++++ CANALES
proc Radio:Canales { nick uhost hand chan arg } {
global streamip streamport CabinaDJ RadioChans RadioLogo RadioTipo
   if {([lsearch -exact [string tolower $CabinaDJ] [string tolower $chan]] != -1) || ($CabinaDJ == "")} {
   putserv "privmsg $chan :12\u21c9 \u21c9 \u21c9 \u21c9 $RadioLogo 12\u21c7 \u21c7 \u21c7 \u21c7"
   putserv "privmsg $chan :12\u27561$nick 12\u27a4 1Canales donde estoy ACTIVADO"
   putserv "privmsg $chan :4\U21db 2$RadioChans"
   putlog "$RadioTipo Mostrando lista de Canales...";return}}
#+++++++++++++++ JOIN CANALES
proc Radio:Join { nick host hand chan arg } {
global botnick CabinaDJ RadioCmd CMDerror
   if {([lsearch -exact [string tolower $CabinaDJ] [string tolower $chan]] != -1) || ($CabinaDJ == "")} {
   if {$arg == ""} {putserv "PRIVMSG $CabinaDJ :$CMDerror ${RadioCmd}join #<canal>";return}
   putserv "PRIVMSG $CabinaDJ :12\u27561$nick 12\u21c9 1Ingresando al CANAL4 $arg"; channel add $arg; save; rehash;return}}
#+++++++++++++++ PART CANALES
proc Radio:Part { nick host hand chan arg } {
global botnick CabinaDJ RadioCmd CMDerror
   if {([lsearch -exact [string tolower $CabinaDJ] [string tolower $chan]] != -1) || ($CabinaDJ == "")} {
   if {$arg == ""} {putserv "PRIVMSG $CabinaDJ :$CMDerror ${RadioCmd}part #<canal>";return}
   putserv "PRIVMSG $CabinaDJ :12\u27561$nick 12\u21c9 1Saliendo del CANAL4 $arg"; channel remove $arg; save; rehash;return}}
#+++++++++++++++ IGNORE
proc ignore { nick uhost hand chan arg } {
global CabinaDJ RadioCmd RadioLogo RadioIgnore RadioPermIgnore
   if {([lsearch -exact [string tolower $CabinaDJ] [string tolower $chan]] != -1) || ($CabinaDJ == "")} {
   if {$arg == ""} {
   putserv "PRIVMSG $CabinaDJ :4ERROR: 1Comando Incompleto, Usa:4 ${RadioCmd}ignore <usuario>"
       return 0
   }
        newignore $arg!*@* "DjIgnore" "Ignore agregado por $nick el [clock format [clock seconds] -format "%d.%m%Y"] a las [clock format [clock seconds] -format %H:%M:%S]" $RadioPermIgnore
      newignore $arg $nick "Ignore agregado por $nick el [clock format [clock seconds] -format "%d.%m%Y"] a las [clock format [clock seconds] -format %H:%M:%S] " 0
      putserv "PRIVMSG $CabinaDJ :5*7*4* 1Agregando IGNORE a2 $arg 4- 1Duracion14 Permanente 4*7*5*"
        putlog "3SHOUTCast: 14Agregando Ignore a2 $arg 14- Duracion4 Permanente"
  }
}
proc proc:ignore { nick uhost hand chan arg } { global CabinaDJ; if {([lsearch -exact [string tolower $CabinaDJ] [string tolower $chan]] != -1) || ($CabinaDJ == "")} { ignore $nick $uhost $hand $chan $arg }}

#+++++++++++++++ QUITAR IGNORE
proc delignore { nick uhost hand chan arg } {
global CabinaDJ RadioCmd RadioLogo RadioIgnore RadioPermIgnore
   if {([lsearch -exact [string tolower $CabinaDJ] [string tolower $chan]] != -1) || ($CabinaDJ == "")} {
   if {$arg == ""} {
   putserv "PRIVMSG $CabinaDJ :4ERROR: 1Comando Incompleto, Usa:4 ${RadioCmd}delignore <usuario>"
       return 0
   }
      killignore $arg!*@*
      putserv "PRIVMSG $CabinaDJ :5*7*4* 1Eliminando IGNORE a2 $arg 4*7*5*"
        putlog "3SHOUTCast: 14Eliminando Ignore a2 $arg "
        return 0
  }
}
proc proc:delignore { nick uhost hand chan arg } { global CabinaDJ; if {([lsearch -exact [string tolower $CabinaDJ] [string tolower $chan]] != -1) || ($CabinaDJ == "")} { delignore $nick $uhost $hand $chan $arg }}

#+++++++++++++++ TOPIC
proc Radio:Topic {nick uhost hand chan arg} {
global CabinaDJ onlinetopic RadioLogo streamip streampass streamport
if {([lsearch -exact [string tolower $CabinaDJ] [string tolower $chan]] != -1) || ($CabinaDJ == "")} {
   set temp [open scripts/LatidoMusical/ip.txt r]; set streamip [gets $temp]; close $temp
   set temp [open scripts/LatidoMusical/passwd.txt r]; set streampass [gets $temp]; close $temp
   set temp [open scripts/LatidoMusical/port.txt r]; set streamport [gets $temp]; close $temp
if {[catch {set sock [socket $streamip $streamport] } sockerror]} {
putlog "error: $sockerror"
return 0} else {
puts $sock "GET /admin.cgi?pass=$streampass&sid=1&mode=viewxml&page=0 HTTP/1.0"
puts $sock "User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9)"
puts $sock "Host: $streamip"
puts $sock "Connection: close"
puts $sock ""
flush $sock
while {[eof $sock] != 1} {
set bl [gets $sock]
if { [string first "standalone" $bl] != -1 } {
set bitrate "bitrate: [string range $bl [shrink + 9 "<BITRATE>" 0 $bl] [shrink - 1 "</BITRATE>" 0 $bl]]"
putserv "TOPIC $CabinaDJ :$RadioLogo 1Está 3ONLINE 1a4 [lindex $bitrate 1]kbps $onlinetopic"
return 0
}}}}
}

#+++++++++++++++ BAN IP
proc pub:banip  {nick uhost hand chan arg} {
global CabinaDJ RadioCmd RadioLogo RadioIgnore RadioPermIgnore
   if {([lsearch -exact [string tolower $CabinaDJ] [string tolower $chan]] != -1) || ($CabinaDJ == "")} {
        set ipban [lindex $arg 0]
   if {$arg == ""} {
   putserv "PRIVMSG $CabinaDJ :4ERROR: 1Comando Incompleto, Usa:4 ${RadioCmd}banip <ip>"
       return 0
   }
      killignore $arg!*@*
        set ipban [lindex $arg 0]
        set temp [open "scripts/LatidoMusical/banip.txt" w+]
        puts $temp $ipban\;255\;
        close $temp
        set temp [open "/home/djbot/eggdrop/Control/sc_serv.ban" w+]
        puts $temp $ipban\;255\;
        close $temp
      putserv "PRIVMSG $CabinaDJ :$RadioLogo 1Agregando BAN al IP:2 $ipban "
        putlog "3SHOUTCast:1Agregando BAN al IP:2 $ipban "
        return 0
   } else { putserv "PRIVMSG $admin :$RadioLogo 1El $ipban ya está BANEADO" }
}

#+++++++++++++++ MP3 LIST
bind pub n !mp3list fbi:estado
proc fbi:estado { nick uhost hand chan arg } {
global botnick CabinaDJ playlist
   set mp3file [open $playlist(file) "r"]
        set playlist [open /home/ircd/autodj/autodj.lst "r"]
   set read [read -nonewline $mp3file]
   close $mp3file
   set data [split $read "\n"]
   set i 0
if {$data == ""} {
   putserv "PRIVMSG $CabinaDJ :\[$nick\] No Has Agregado \002 PLAYLIST \002"
   return
}
   putserv "PRIVMSG $CabinaDJ :\[$nick\] Cargando Lista de\002 PLAYLISTs \002..."
foreach line $data {
   set read_chan [lindex [split $line] 0]
if {[string match -nocase $read_chan $CabinaDJ]} {
   set i [expr $i +1]
   set read_zpendientes [lindex [split $line] 1]
        set read_playlist [string range [join [lrange $line 1 end]] 0 end]
   putserv "PRIVMSG $CabinaDJ :$i.) $read_playlist"
        return 0
   }
  }
}

#+++++++++++++++ VOTACION
proc votacion { nick uhost hand chan arg } {
global RadioLogo RadioCmd
   set temp [open scripts/LatidoMusical/encuesta.txt r]
   set encuesta [gets $temp]
   close $temp
   if {$dj == ""} {
   putlog "SHOUTCast: Tiempo para enviar la encuesta"
   return 0
}
RadioGlobal privmsg "$RadioLogo 2Te Invita a Participar de la ENCUESTA y a VOTAR por tu Artista/grupo FAVORITO, usa:4 ${RadioCmd}encuesta"
putlog "Encuesta Emitida..."
}

#++++++++++++++#
##########[(07)] PROCESOS
#++++++++++++++#
#+++++++++++++++ USUARIOS
#+++++++++++++++ WINAMP
proc winamp { nick uhost hand chan arg } {
global botnick streamip streamport RadioWinamp RadioChans
if {([lsearch -exact [string tolower $RadioChans] [string tolower $chan]] != -1) || ($RadioChans == "")} {
putserv "privmsg $chan :4\u2756 14Para escucharnos a través de WINAMP, presiona 12CTRL + L 14y pega 4\u27a4 1$RadioWinamp";return}}
#+++++++++++++++ REPRODUCTOR
proc reproductor { nick uhost hand chan arg } {
global bo


En línea

TickTack


Desconectado Desconectado

Mensajes: 428


CipherX


Ver Perfil
Re: tcl de radio de shoucast
« Respuesta #1 en: 18 Febrero 2024, 11:58 am »

Al revisar la configuración de la tcl de radio que compartiste (No lo revise todo. Es muchísimo lo que está escrito. Se necesitaría más tiempo para revisarlo completamente), veo que la mayoría de los mensajes de error que se muestran en la party line del bot están relacionados con variables no definidas o errores en la lectura de archivos.

Para solucionar el error "can't read 'curhigh': no such variable", te recomendaría revisar la parte del código donde se hace referencia a la variable "curhigh" y asegurarte de que esté correctamente definida y que se esté utilizando de manera adecuada en el contexto en el que aparece. Es posible que haya un error de sintaxis o que la variable no esté siendo inicializada correctamente.

Además revisa la sección donde se leen y escriben archivos, ya que es posible que haya algún problema con la lectura o escritura de los archivos de configuración, lo que podría estar causando los mensajes de error que mencionas.


En línea

Danielㅤ


Desconectado Desconectado

Mensajes: 1.681


🔵🔵🔵🔵🔵🔵🔵


Ver Perfil
Re: tcl de radio de shoucast
« Respuesta #2 en: 18 Febrero 2024, 17:35 pm »

Hola, ese código está escrito en el lenguaje TCL y es usado generalmente para bots eggdrops, hoy en dia es muy obsoleto y desde hace bastante tiempo que no se lo utiliza, tanto ese lenguaje como los bots eggdrops pasaron a la historia, por lo que yo te recomiendo que buscaras otro script en otro lenguaje.

Ahora en cuánto al error que estás teniendo y como solucionarlo, lo primero habría que ver el código original en ingles y probarlo porque hay veces que los usuarios sin conocimientos de programación modifican los códigos como en tu caso que lo has traducido al idoma español pero podes haber borrado algo del código que necesitaba por ejemplo una llave o una variable o una comilla, etc. y por eso no funcionar, por eso digo lo de probar el código original y ver si realmente no funciona.


Saludos
« Última modificación: 18 Febrero 2024, 17:39 pm por Danielㅤ » En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
Un par de dudas sobre Emisora Shoucast
Multimedia
Kasswed 1 1,336 Último mensaje 3 Diciembre 2005, 12:33 pm
por SmopuiM
Radio en VB?
Programación Visual Basic
ranslsad 1 1,320 Último mensaje 22 Mayo 2009, 05:12 am
por BlackZeroX
Explotación práctica de señales de radio con Software Defined Radio
Noticias
r32 0 1,243 Último mensaje 1 Noviembre 2014, 03:18 am
por r32
Escucha emisoras de radio de cualquier rincón del mundo con Radio Garden
Noticias
wolfbcn 0 1,591 Último mensaje 11 Febrero 2017, 02:19 am
por wolfbcn
Escuchar música en la radio: dónde escuchar Rock Radio en el aire
Multimedia
Namerta 0 2,564 Último mensaje 23 Septiembre 2021, 06:33 am
por Namerta
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines