Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- set radiochans "#RadioLatina"
- set adminchans "#djs_radiolatina"
- set adminchans1 "#djs_radiolatina"
- set streamip "malvadooo.xyz
- set streamport "8000"
- set streampass "13102004"
- set scstatstrigger "!estado"
- set scstreamtrigger "!enlace"
- set scplayingtrigger "!radio"
- set sclistenertrigger "!oyentes"
- set scdjtrigger "!dj"
- set scsetdjtrigger "!emite"
- set scunsetdjtrigger "!auto"
- set scwishtrigger "!peticion"
- set scgreettrigger "!saludos"
- set sclastsongstrigger "!ultimas"
- set schelptrigger "!comandos"
- set alertadmin ""
- set doalertadmin "1"
- set announce "1"
- set urltopic "0"
- set ctodjc "1"
- set tellsongs "1"
- set tellusers "1"
- set tellbitrate "1"
- set advertise "1"
- set advertiseonlyifonline "1"
- set offlinetext "1 La Radio Se Encuentra 7APAGADA"
- set offlinetopic ""
- #set onlinetext "1Radio IRC 6TRANSMITIENDO a 4 /bitrate/ kbits 1Sitonizanos en -> 12http://www.lc-lesbianas.tk/"
- #set onlinetext "1Radio IRC 6TRANSMITIENDO a 4 /bitrate/ kbits 1Sitonizanos en -> 12http://$streamip:$streamport/listen.pls"
- #set onlinetext "10.::@4 RADIOENIGMA10 @::.1 Sintonízanos en 4 http://www.lc-lesbianas.tk/ 1Facebook del canal:4 https://www.facebook.com/radioenigmaonair 1Para ver comandos de la radio, teclea:4 !radio"
- set onlinetopic ""
- #set streamtext "Sintoniza Radio IRC en http://$streamip:$streamport/listen.pls"
- #set streamtext "10.::@4 RADIOENIGMA10 @::.1 Sintonízanos en 4 http://www.lc-lesbianas.tk/ 1Facebook del canal:4 https://www.facebook.com/radioenigmaonair 1Para ver comandos de la radio, teclea:4 !radio"
- #set advertisetext "Radio IRC 4TRANSMITIENDO ---> 2 http://$streamip:$streamport/listen.pls - ... Para Ver Comandos de la Radio Teclea 2!radio "
- #set advertisetext "10.::@4 RADIOENIGMA10 @::.1 Sintonízanos en 4 http://www.lc-lesbianas.tk/ 1Facebook del canal:4 https://www.facebook.com/radioenigmaonair 1Para ver comandos de la radio, teclea:4 !radio"
- #set advertisetext "1»10R1« 1Emitiendo: 1»6¤1«110 GUZ 1»6¤1«1 Desde -_ chan _- Sintoniza 1En: 10www6.lc-lesbianas.10tk 11 La Radio Que Prende Tus Sentidos 10 Peticiones 1!pido Tema Artista 10Comandos 1Escribe 6!RL 1»10L1«"
- # end of config #####################
- bind pub - $scstatstrigger pub_scstat
- bind msg - $scstatstrigger msg_scstat
- bind pub - $scplayingtrigger pub_playing
- bind msg - $scplayingtrigger msg_playing
- bind pub - $scdjtrigger pub_dj
- bind msg - $scdjtrigger msg_dj
- bind pub - $scsetdjtrigger pub_setdj
- bind msg - $scsetdjtrigger msg_setdj
- bind pub - $scunsetdjtrigger pub_unsetdj
- bind msg - $scunsetdjtrigger msg_unsetdj
- bind pub - $scwishtrigger pub_wish
- bind msg - $scwishtrigger msg_wish
- bind pub - $scgreettrigger pub_greet
- bind msg - $scgreettrigger msg_greet
- bind pub - $scstreamtrigger pub_stream
- bind msg - $scstreamtrigger msg_stream
- bind pub - $sclastsongstrigger pub_lastsongs
- bind msg - $sclastsongstrigger msg_lastsongs
- bind pub - $sclistenertrigger pub_listener
- bind msg - $sclistenertrigger msg_listener
- bind pub - $schelptrigger pub_help
- bind msg - $schelptrigger msg_help
- #bind time - "* * * * *" isonline
- bind time - "*5 * * * *" isonline
- bind time - "*0 * * * *" isonline
- bind time - "00 * * * *" advertise
- bind time - "20 * * * *" advertise
- bind time - "40 * * * *" advertise
- bind nick - * djnickchange
- bind pub - !facebook pub_facebook
- bind pub - !xiialive pub_xiialive
- bind pub - !tunein pub_tunein
- bind pub - !winamp pub_winamp
- bind pub - !reproductor pub_reproductor
- bind pub - !abre pub_abrepeticiones
- bind pub - !cierra pub_cierrapeticiones
- bind pub - !status.peticiones pub_statuspeticiones
- bind pub - !adminchan proc_adminchan
- bind pub - !adminchandj proc_adminchandj
- bind pub - !canales proc_canales
- set dj ""
- set surl ""
- set bitrate ""
- set stitle ""
- set djciudad ""
- if {[file exists dj]} {
- set temp [open "dj" r]
- set dj [gets $temp]
- close $temp
- }
- ####prueba
- proc cl_chanlist { } {
- global botnick
- set chanlist ""
- foreach chan [channels] {
- append chanlist "$chan "
- }
- return $chanlist
- }
- proc proc_canales { nick uhost hand chan arg } {
- global adminchans
- if {([lsearch -exact [string tolower $adminchans] [string tolower $chan]] != -1) || ($adminchans == "")} {
- putserv "privmsg $chan : 1Locutores 1entrar: 7#djs_enigmaticas"
- }
- }
- proc proc_adminchan { nick uhost hand chan arg } {
- global adminchans
- putserv "privmsg $chan : El canal de la administracion es $adminchans "
- }
- proc proc_adminchandj { nick uhost hand chan arg } {
- global adminchans1
- putserv "privmsg $chan : El canal de la administracion es $adminchans1 "
- }
- proc pub_xiialive { nick uhost hand chan arg } {
- putserv "privmsg $chan : 1 Sonando: 7 $songtitle"
- }
- proc pub_facebook { nick uhost hand chan arg } {
- putserv "privmsg $chan : 7$nick 1 Seguinos en 7 Facebook: http://facebook.com/radioenigmaonair"
- }
- proc pub_tunein { nick uhost hand chan arg } {
- putserv "privmsg $chan : 7 $nick Tunein: 1Lo Siento Tunein Fuera De Linea"
- }
- proc pub_winamp { nick uhost hand chan arg } {
- putserv "privmsg $chan : 1 Esta Emitiendo: 7 $dj 1 Winamp: 7 http://91.134.241.109:8000 1 WEB: 7 www.lc-lesbianas.tk"
- }
- proc pub_reproductor { nick uhost hand chan arg } {
- putserv "privmsg $chan : 7 $nick 1 Reproductor: 7 http://http://91.134.241.109:8000"
- }
- proc pub_abrepeticiones { nick uhost hand chan arg } {
- global adminchans1
- if {([lsearch -exact [string tolower $adminchans1] [string tolower $chan]] != -1) || ($adminchans1 == "")} {
- set temp [open "djnick" r]
- set djnick [gets $temp]
- close $temp
- putserv "privmsg $adminchans1 :PETICIONES: Las Peticiones han sido abierta"
- poststuff privmsg "1Peticiones 3ABIERTAS 1. Usa: 7!peticion Artista-Cancion 1para solicitar un tema."
- set temp [open "peticiones" w+]
- puts $temp "Abiertas"
- close $temp
- }
- }
- proc pub_cierrapeticiones { nick uhost hand chan arg } {
- global adminchans1
- if {([lsearch -exact [string tolower $adminchans1] [string tolower $chan]] != -1) || ($adminchans1 == "")} {
- set temp [open "djnick" r]
- set djnick [gets $temp]
- close $temp
- putserv "privmsg $adminchans1 :PETICIONES: Las Peticiones han sido cerradas"
- poststuff privmsg "1Peticiones 4CERRADAS 1. Gracias por preferir 7 Radio Enigma "
- set temp [open "peticiones" w+]
- puts $temp "Cerradas"
- close $temp
- }
- }
- proc pub_statuspeticiones { nick uhost hand chan arg } {
- set temp [open "peticiones" r]
- set peticiones [gets $temp]
- close $temp
- putserv "privmsg $chan :PETICIONES: Las Peticiones estan $peticiones"
- }
- ###Modulo para agregar ciudad
- bind pub D !ciudad pub_setciudad
- proc pub_setciudad { nick uhost hand chan arg } { global adminchans1; if {([lsearch -exact [string tolower $adminchans1] [string tolower $chan]] != -1) || ($adminchans1 == "")} { setciudad $arg }}
- proc setciudad { djciudad } {
- putlog "shoutcast: $djciudad "
- if {$djciudad == "" } { set djciudad $djciudad }
- global streamip streamport streampass dj
- putlog "shoutcast: Nuevo Ciudad agregada para $dj ( $djciudad )"
- set temp [open "ciudad" w+]
- puts $temp $djciudad
- close $temp
- rehash
- }
- ### Fin Modulo
- bind pub - !siguiente pub_siguiente
- proc pub_siguiente { nick uhost hand chan arg } {
- exec killall sc_trans_linux -WINCH
- putlog "shoutcast: Cambio de canción pedido por $nick"
- }
- bind pub - !playlist pub_playlist
- proc pub_playlist { nick uhost hand chan arg } {
- exec killall sc_trans_linux -USR1
- putlog "shoutcast: $nick pidio recargar el playlist"
- }
- proc shrink { calc number string start bl} { return [expr [string first "$string" $bl $start] $calc $number] }
- proc status { } {
- global streamip streamport streampass
- if {[catch {set sock [socket $streamip $streamport] } sockerror]} {
- putlog "error: $sockerror"
- return 0 } else {
- puts $sock "GET /admin.cgi?pass=$streampass&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 streamstatus [string range $bl [shrink + 14 "<STREAMSTATUS>" 0 $bl] [shrink - 1 "</STREAMSTATUS>" 0 $bl]]
- }}
- close $sock
- }
- if { $streamstatus == "1" } { return 1 } else { return 0 }
- }
- proc poststuff { mode text } {
- global radiochans dj
- set curlist "0"
- set curhigh "0"
- set surl ""
- set cursong ""
- set sgenre ""
- set bitrate "0"
- set stitle ""
- set temp [open "isonline" r]
- while {[eof $temp] != 1} {
- set zeile [gets $temp]
- if {[string first "curlist:" $zeile] != -1 } { set curlist $zeile }
- if {[string first "curhigh:" $zeile] != -1 } { set curhigh $zeile }
- if {[string first "cursong:" $zeile] != -1 } { set cursong [lrange $zeile 1 [llength $zeile]]] }
- if {[string first "sgenre:" $zeile] != -1 } { set sgenre [lrange $zeile 1 [llength $zeile]]}
- if {[string first "serverurl:" $zeile] != -1 } { set surl [lindex $zeile 1] }
- if {[string first "bitrate:" $zeile] != -1 } { set bitrate [lindex $zeile 1] }
- if {[string first "stitle:" $zeile] != -1 } { set stitle [lindex $zeile 1] }
- }
- close $temp
- regsub -all "/stitle/" $text "$stitle" text
- regsub -all "/curlist/" $text "$curlist" text
- regsub -all "/curhigh/" $text "$curhigh" text
- regsub -all "/cursong/" $text "$cursong" text
- regsub -all "/sgenre/" $text "$sgenre" text
- regsub -all "/surl/" $text "$surl" text
- regsub -all "/bitrate/" $text "$bitrate" text
- regsub -all "/dj/" $text "$dj" text
- foreach chan [channels] {
- if {$radiochans == "" } { putserv "$mode $chan :$text" }
- if {$radiochans != "" } {
- if {([lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1)} {putserv "$mode $chan :$text"}
- }}}
- proc schelp { target chan } {
- global scstatstrigger scstreamtrigger scplayingtrigger scdjtrigger sclastsongstrigger scwishtrigger scgreettrigger sclistenertrigger radiochans
- putserv "privmsg $chan : 1 $target Los Comandos de la Radio: 7!Enlace 1Para Ver Nuestro Link: 7!Radio 1Conoces La Cancion Que Está Sonando 7!Dj 1Nuestro Dj En Emision 7!Peticion Tema Artista 1Para Pedir Temas 7!Facebook 1- 7!Tunein1 - 7!Winamp 1 - Gracias 1 Por Sintonizar"
- }
- proc pub_help {nick uhost hand chan arg} {
- global radiochans
- if {$radiochans == "" } { schelp $nick $chan }
- if {$radiochans != "" } {
- if {([lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1) || ($radiochans == "")} { schelp $nick $chan }
- }}
- proc advertise { nick uhost hand chan arg } {
- global advertisetext advertise advertiseonlyifonline dj djciudad ciud
- set temp [open "ciudad" r]
- set ciud [gets $temp]
- close $temp
- if {$advertise == "1" && $advertiseonlyifonline == "0"} { poststuff privmsg "$advertisetext" }
- if {$advertise == "1" && $advertiseonlyifonline == "1" && [status] == 1} {
- #poststuff privmsg "$advertisetext"
- poststuff privmsg "7 E1n Controles: 7 $dj 1 Sintonizanos En: 7 www.lc-lesbianas.tk 1 La Radio 7 Mas Prendida 1 Peticiones: 7 !Peticion 1 Tema-7 Artista 1 Sonando: 7 $songtitle"
- }
- }
- proc setdj {nickname djnickname } {
- set acmd [lindex $djnickname 0]
- set ciud [lrange $djnickname 1 end]
- putlog "prueba $ciud"
- if {$djnickname == ""} { set djnickname $ciud }
- global streamip streamport streampass dj ctodjc
- putquick "MODE #djs_enigma -o $dj"
- putquick "MODE #djs_enigma +v $dj"
- poststuff privmsg "1Emite ahora:7 $nickname"
- putquick "MODE #djs_enigma +o $nickname"
- putlog "shoutcast: Nuevo Dj: $djnickname ($nickname)"
- set temp [open "dj" w+]
- puts $temp $nickname
- close $temp
- set temp [open "djnick" w+]
- puts $temp $nickname
- close $temp
- set temp [open "ciudad" w+]
- puts $temp $djnickname
- close $temp
- rehash
- if { [status] == "1" } { poststuff privmsg ""
- if { $ctodjc == "1" } {
- set temp [open "isonline" r]
- while {[eof $temp] != 1} {
- set zeile [gets $temp]
- if {[string first "isonline:" $zeile] != -1 } { set oldisonline $zeile }
- if {[string first "curlist:" $zeile] != -1 } { set oldcurlist $zeile }
- if {[string first "curhigh:" $zeile] != -1 } { set oldcurhigh $zeile }
- if {[string first "cursong:" $zeile] != -1 } { set oldsong $zeile }
- if {[string first "bitrate:" $zeile] != -1 } { set oldbitrate $zeile }
- }
- close $temp
- }
- } else {
- putserv "privmsg $nickname :Comando Invalido Por Motivo de tener Nuestra radio fuera de Línea (APAGADA)" }
- }
- proc msg_setdj { nick uhost hand arg } { setdj $nick $arg }
- proc pub_setdj { nick uhost hand chan arg } { global adminchans1; if {([lsearch -exact [string tolower $adminchans1] [string tolower $chan]] != -1) || ($adminchans1 == "")} { setdj $nick $arg }}
- proc unsetdj { nick } {
- global dj adminchans1
- poststuff privmsg "7 Fin 1 Emision 7 .::. $dj .::. 1 Emitiendo Ahora 7 .::. AutoDJmix .::. 1 Sintoniza En 7 www.lc-lesbianas.tk"
- set temp [open "dj" w+]
- puts $temp "AutoDJ"
- close $temp
- set temp [open "djnick" w+]
- puts $temp "AutoDJ"
- close $temp
- set temp [open "ciudad" w+]
- puts $temp "Mexico"
- close $temp
- set temp [open "peticiones" w+]
- puts $temp "Cerradas"
- close $temp
- #putserv "privmsg $adminchans1 :Dj Puesto en Automatico .."
- rehash
- }
- proc msg_unsetdj { nick uhost hand arg } { unsetdj $nick }
- proc pub_unsetdj { nick uhost hand chan arg } { global adminchans1; if {([lsearch -exact [string tolower $adminchans1] [string tolower $chan]] != -1) || ($adminchans1 == "")} { unsetdj $nick }}
- proc listener { target } {
- global streamip streamport streampass adminchans
- putlog "shoutcast: $target cuenta solicitada del oyente"
- if {[catch {set sock [socket $streamip $streamport] } sockerror]} {
- putlog "error: $sockerror"
- return 0 } else {
- puts $sock "GET /admin.cgi?pass=$streampass&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 repl [string range $bl [shrink + 18 "<CURRENTLISTENERS>" 0 $bl] [shrink - 1 "</CURRENTLISTENERS>" 0 $bl]]
- set curhigh [string range $bl [shrink + 15 "<PEAKLISTENERS>" 0 $bl] [shrink - 1 "</PEAKLISTENERS>" 0 $bl]]
- set maxl [string range $bl [shrink + 14 "<MAXLISTENERS>" 0 $bl] [shrink - 1 "</MAXLISTENERS>" 0 $bl]]
- set avgtime [string range $bl [shrink + 13 "<AVERAGETIME>" 0 $bl] [shrink - 1 "</AVERAGETIME>" 0 $bl]]
- }}
- close $sock
- #putserv "notice $target :Actualmente hay $repl Oyente(s), La Radio Tiene Capacidad para $maxl Oyentes, el número máximo de Oyentes Hasta Ahora es de $curhigh Oyentes, el promedio de escucha es a $avgtime"
- putserv "notice $target : 10$target 1Actualmente hay 10 $repl 1Oyente(s), La Radio Tiene Capacidad para 10 $maxl 1Oyentes, el número máximo de Oyentes Hasta Ahora es de 10 $curhigh 1Oyentes, el promedio de escucha es:10 $avgtime "
- }}
- proc msg_listener { nick uhost hand arg } { listener $nick }
- proc pub_listener { nick uhost hand chan arg } { global adminchans; if {([lsearch -exact [string tolower $adminchans] [string tolower $chan]] != -1) || ($adminchans == "")} { listener $nick }}
- proc wish { nick chan arg } {
- global radiochans adminchans1
- if {$arg == ""} { putserv "privmsg $chan : 1$nick Por Favor Especifica El Tema Que Deseas Pedir 7!peticion Tema Artista 1Gracias Por Sintonizar return 0}
- if { [status] == "1" } {
- set temp [open "djnick" r]
- set djnick [gets $temp]
- close $temp
- putserv "privmsg $radiochans1 :1PEDIDO MUSICAL: 14$arg 1de Parte de 7$nick"
- putserv "privmsg $adminchans1 :14.:7 PETICION 14:. 1 $djnick 1el nick 7$nick 1pidio 10$arg 1Desde 10$chan"
- putserv "privmsg $djnick :7$djnick 1el nick 7$nick 1 Pide 7$arg 1Desde 7$chan "
- putserv "privmsg $chan : 7$nick 1Tu 7Peticion 1Ha Sido Registrada."
- } else {
- putserv "notice $nick :Lo Siento la Radio Esta Apagada :(" }
- }
- proc msg_wish { nick uhost hand arg } { wish $nick $arg }
- proc pub_wish { nick uhost hand chan arg } { global radiochans; if {([lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1) || ($radiochans == "")} { wish $nick $arg }}
- proc pub_wish { nick uhost hand chan arg } {
- global radiochans
- set temp [open "peticiones" r]
- set peticiones [gets $temp]
- close $temp
- if {$peticiones == "Abiertas"} {
- if {([lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1) || ($radiochans == "") } {
- #wish $nick $arg
- wish $nick $chan $arg
- }
- } else
- putserv "privmsg $chan : 7$nick 1En Este Momento Las Peticiones Estan 4CERRADAS 1, 1Espera Que Nuestro Dj Vuelva Abrir Peticiones. Gracias Por Sintonizar"
- }
- proc sclastsongs { target } {
- global streamip streamport streampass
- putlog "shoutcast: $target Historia solicitada de la canción"
- if {[catch {set sock [socket $streamip $streamport] } sockerror]} {
- putlog "error: $sockerror"
- return 0 } else {
- puts $sock "GET /admin.cgi?pass=$streampass&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 songs [string range $bl [string first "<TITLE>" $bl] [expr [string last "</TITLE>" $bl] + 7]]
- regsub -all "<" $songs "<" songs
- regsub -all ">" $songs ">" songs
- regsub -all "&" $songs "+" songs
- regsub -all """ $songs "\"" songs
- regsub -all "'" $songs "'" songs
- regsub -all "ÿ" $songs "" songs
- regsub -all "<TITLE>" $songs "(" songs
- regsub -all "</TITLE>" $songs ")" songs
- regsub -all "<SONG>" $songs "" songs
- regsub -all "</SONG>" $songs " - " songs
- regsub -all "<PLAYEDAT>" $songs "" songs
- regsub -all "</PLAYEDAT>" $songs "" songs
- regsub -all {\d} $songs "" songs
- regsub -all "´" $songs "´" songs
- regsub -all "–" $songs "-" songs
- regsub -all "ö" $songs "ö" songs
- regsub -all "ä" $songs "ä" songs
- regsub -all "ü" $songs "ü" songs
- regsub -all "Ö" $songs "Ö" songs
- regsub -all "Ä" $songs "Ä" songs
- regsub -all "Ü" $songs "Ü" songs
- regsub -all "ß" $songs "ß" songs
- }}
- close $sock
- putserv "notice $target :$songs"
- }}
- proc msg_lastsongs { nick uhost hand arg } { sclastsongs $nick }
- proc pub_lastsongs { nick uhost hand chan arg } { global radiochans; if {([lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1) || ($radiochans == "")} { sclastsongs $nick }}
- proc scstream { target } {
- global streamip streamport streamtext radiochans
- putlog "shoutcast: Enlace de Informacion solicitada por $target"
- putserv "privmsg $radiochans : aa "
- }
- proc msg_stream { nick uhost hand arg } { scstream $nick }
- proc pub_stream { nick uhost hand chan arg } { global radiochans; if {([lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1) || ($radiochans == "")} {
- putlog "shoutcast: Enlace de Informacion solicitada por $nick"
- putserv "privmsg $chan : 7 $nick 1Sintoniza En: 7http://www.lc-lesbianas.tk"
- }
- }
- proc scgreet { nick arg } {
- if {$arg == ""} { putserv "notice $nick :Olvidó de agregar su Saludos Ej:(!saludos <Tus Saludos>)"; return 0}
- if { [status] == "1" } {
- set temp [open "djnick" r]
- set djnick [gets $temp]
- close $temp
- putserv "privmsg $djnick :Enviar unos Saludos: $arg de Parte de $nick"
- } else {
- putserv "notice $nick :Lo Siento la Radio Esta Apagada :(" }
- }
- proc msg_greet { nick uhost hand arg } { scgreet $nick $arg }
- proc pub_greet { nick uhost hand chan arg } { global radiochans; if {([lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1) || ($radiochans == "")} { scgreet $nick $arg }}
- proc djnickchange { oldnick uhost hand chan newnick } {
- set temp [open "djnick" r]
- set djnick [gets $temp]
- close $temp
- if {$oldnick == $djnick} {
- putlog "shoutcast: Cambio de Nick del Dj de $oldnick a $newnick"
- set temp [open "djnick" w+]
- puts $temp $newnick
- close $temp
- }}
- proc dj { target chan } {
- global streamip streamport streampass dj
- putlog "shoutcast: $target pedido La informacion del DJ"
- if {[status] == 1} {
- if {[file exists dj]} {
- set temp [open "dj" r]
- set dj [gets $temp]
- close $temp
- putserv "privmsg $chan :10$target 1Emitiendo: 7 $dj 1Sintoniza En: 7 www.lc-lesbianas.tk"
- } else { putserv "notice $target :Lo Siento, Por el momento no hay ningun dj emitiendo" }
- } else { putserv "notice $target :Lo Siento la Radio Esta Apagada :(" }
- }
- proc msg_dj { nick uhost hand arg } { dj $nick"}
- proc pub_dj { nick uhost hand chan arg } { global radiochans; if {([lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1) || ($radiochans == "")} { dj $nick $chan }}
- proc scstat {target} {
- global streamip streamport streampass
- putlog "shoutcast: $target pedido del Estado del servidor"
- if {[catch {set sock [socket $streamip $streamport] } sockerror]} {
- putlog "error: $sockerror"
- return 0 } else {
- puts $sock "GET /admin.cgi?pass=$streampass&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 streamstatus [string range $bl [shrink + 14 "<STREAMSTATUS>" 0 $bl] [shrink - 1 "</STREAMSTATUS>" 0 $bl]]
- set repl [string range $bl [shrink + 18 "<CURRENTLISTENERS>" 0 $bl] [shrink - 1 "</CURRENTLISTENERS>" 0 $bl]]
- set curhigh [string range $bl [shrink + 15 "<PEAKLISTENERS>" 0 $bl] [shrink - 1 "</PEAKLISTENERS>" 0 $bl]]
- set currentl [string range $bl [shrink + 18 "<CURRENTLISTENERS>" 0 $bl] [shrink - 1 "</CURRENTLISTENERS>" 0 $bl]]
- set surl [string range $bl [shrink + 11 "<SERVERURL>" 0 $bl] [shrink - 1 "</SERVERURL>" 0 $bl]]
- set maxl [string range $bl [shrink + 14 "<MAXLISTENERS>" 0 $bl] [shrink - 1 "</MAXLISTENERS>" 0 $bl]]
- set bitrate [string range $bl [shrink + 9 "<BITRATE>" 0 $bl] [shrink - 1 "</BITRATE>" 0 $bl]]
- set stitle [string range $bl [shrink + 13 "<SERVERTITLE>" 0 $bl] [shrink - 1 "</SERVERTITLE>" 0 $bl]]
- set sgenre [string range $bl [shrink + 13 "<SERVERGENRE>" 0 $bl] [shrink - 1 "</SERVERGENRE>" 0 $bl]]
- if {$sgenre != ""} {set sgenre " ($sgenre)"}
- set avgtime [string range $bl [shrink + 13 "<AVERAGETIME>" 0 $bl] [shrink - 1 "</AVERAGETIME>" 0 $bl]]
- set irc [string range $bl [shrink + 5 "<IRC>" 0 $bl] [shrink - 1 "</IRC>" 0 $bl]]
- set icq [string range $bl [shrink + 5 "<ICQ>" 0 $bl] [shrink - 1 "</ICQ>" 0 $bl]]
- if {$icq == 0} { set icq "N/A" }
- set aim [string range $bl [shrink + 5 "<AIM>" 0 $bl] [shrink - 1 "</AIM>" 0 $bl]]
- set webhits [string range $bl [shrink + 9 "<WEBHITS>" 0 $bl] [shrink - 1 "</WEBHITS>" 0 $bl]]
- set streamhits [string range $bl [shrink + 12 "<STREAMHITS>" 0 $bl] [shrink - 1 "</STREAMHITS>" 0 $bl]]
- set version [string range $bl [shrink + 9 "<VERSION>" 0 $bl] [shrink - 1 "</VERSION>" 0 $bl]]
- if {$streamstatus == 1} {
- if {[file exists dj]} {
- set temp [open "dj" r]
- set dj [gets $temp]
- close $temp
- } else { set dj "Automático" }
- putserv ""
- } else {
- putserv "notice $target :1$stitle$sgenre Actualmente 4ESTA APAGADA, en shoutcast $version y Transmitiendo a $bitrate kbps, Mas información en $surl" }
- putserv "notice $target :Actualmente hay $repl Oyentes, La Capacidad maxima es $maxl, Total de Oyentes En la Radio fue de $curhigh oyentes."
- putserv "notice $target :El tiempo promedio de escucha es de $avgtime segundos, La Radio tiene $webhits webhits y $streamhits streamhits."
- putserv "notice $target :Si Nuestra Radio 1ESTA EN LINEA, Use 4!dj Para ver quien es actualmente el DJ."
- }}
- close $sock
- }}
- proc msg_scstat { nick uhost hand arg } { scstat $nick}
- proc pub_scstat { nick uhost hand chan arg } { global radiochans; if {([lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1) || ($radiochans == "")} { scstat $nick }}
- proc playing {target chan} {
- global streamip streamport streampass dj
- putlog "shoutcast: $target pedido la canción actual"
- if {[catch {set sock [socket $streamip $streamport] } sockerror]} {
- putlog "error: $sockerror"
- return 0 } else {
- puts $sock "GET /admin.cgi?pass=$streampass&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 streamstatus [string range $bl [shrink + 14 "<STREAMSTATUS>" 0 $bl] [shrink - 1 "</STREAMSTATUS>" 0 $bl]]
- set songtitle [string range $bl [shrink + 11 "<SONGTITLE" 0 $bl] [shrink - 1 "</SONGTITLE>" 0 $bl]]
- set songurl [string range $bl [shrink + 9 "<SONGURL>" 0 $bl] [shrink - 1 "</SONGURL>" 0 $bl]]
- if {$songurl != ""} { set songurl " ($songurl)"}
- regsub -all "<" $songtitle "<" songtitle
- regsub -all ">" $songtitle ">" songtitle
- regsub -all "&" $songtitle "+" songtitle
- regsub -all """ $songtitle "\"" songtitle
- regsub -all "'" $songtitle "'" songtitle
- regsub -all "ÿ" $songtitle "" songtitle
- regsub -all "´" $songtitle "´" songtitle
- regsub -all "–" $songtitle "-" songtitle
- regsub -all "ö" $songtitle "ö" songtitle
- regsub -all "ä" $songtitle "ä" songtitle
- regsub -all "ü" $songtitle "ü" songtitle
- regsub -all "Ö" $songtitle "Ö" songtitle
- regsub -all "Ä" $songtitle "Ä" songtitle
- regsub -all "Ü" $songtitle "Ü" songtitle
- regsub -all "ß" $songtitle "ß" songtitle
- if {$streamstatus == 1} {
- putserv "privmsg $chan :7 E1n Cabina 7 $dj 1 Sintonizanos En: 7 www.lc-lesbianas.tk 1 La Radio 7 Mas Prendida 1 Peticiones: 7 !Peticion Tema- 7Artista 1 Sonando: 7 $songtitle"
- #putserv "notice $target :Canción que suena es: 5$songtitle"
- } else {
- putserv "notice $target :El servidor es Actualmente Fuera de Línea *4APAGADO*, Lo Siento"
- }}}
- close $sock
- }}
- proc msg_playing { nick uhost hand arg } { playing $nick}
- proc pub_playing { nick uhost hand chan arg } { global radiochans; if {([lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1) || ($radiochans == "")} { playing $nick $chan }}
- proc isonline { nick uhost hand chan arg } {
- global radiochans announce tellusers tellsongs tellbitrate urltopic dj
- global offlinetext offlinetopic onlinetext onlinetopic
- global streamip streampass streamport dj
- global doalertadmin alertadmin
- if {$announce == 1 || $tellsongs == 1 || $tellusers == 1 || $tellbitrate == 1} {
- set isonlinefile "isonline"
- set oldisonline "isonline: 0"
- set oldcurlist "curlist: 0"
- set oldcurhigh "curhigh: 0"
- set oldsong "cursong: 0"
- set oldbitrate "bitrate: 0"
- if {[file exists $isonlinefile]} {
- putlog "shoutcast: Comprobando si El Enlace está en LINEA"
- set temp [open "isonline" r]
- while {[eof $temp] != 1} {
- set zeile [gets $temp]
- if {[string first "isonline:" $zeile] != -1 } { set oldisonline $zeile }
- if {[string first "curlist:" $zeile] != -1 } { set oldcurlist $zeile }
- if {[string first "curhigh:" $zeile] != -1 } { set oldcurhigh $zeile }
- if {[string first "cursong:" $zeile] != -1 } { set oldsong $zeile }
- if {[string first "bitrate:" $zeile] != -1 } { set oldbitrate $zeile }
- }
- close $temp
- }
- if {[catch {set sock [socket $streamip $streamport] } sockerror]} {
- putlog "error: $sockerror"
- return 0} else {
- puts $sock "GET /admin.cgi?pass=$streampass&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 streamstatus "isonline: [string range $bl [shrink + 14 "<STREAMSTATUS>" 0 $bl] [shrink - 1 "</STREAMSTATUS>" 0 $bl]]"
- set repl "curlist: [string range $bl [shrink + 18 "<CURRENTLISTENERS>" 0 $bl] [shrink - 1 "</CURRENTLISTENERS>" 0 $bl]]"
- set curhigh "curhigh: [string range $bl [shrink + 15 "<PEAKLISTENERS>" 0 $bl] [shrink - 1 "</PEAKLISTENERS>" 0 $bl]]"
- set currentl [string range $bl [shrink + 18 "<CURRENTLISTENERS>" 0 $bl] [shrink - 1 "</CURRENTLISTENERS>" 0 $bl]]
- set surl "serverurl: [string range $bl [shrink + 11 "<SERVERURL>" 0 $bl] [shrink - 1 "</SERVERURL>" 0 $bl]]"
- set cursong "cursong: [string range $bl [shrink + 11 "<SONGTITLE" 0 $bl] [shrink - 1 "</SONGTITLE>" 0 $bl]]"
- set songurl [string range $bl [shrink + 9 "<SONGURL>" 0 $bl] [shrink - 1 "</SONGURL>" 0 $bl]]
- set bitrate "bitrate: [string range $bl [shrink + 9 "<BITRATE>" 0 $bl] [shrink - 1 "</BITRATE>" 0 $bl]]"
- set stitle "stitle: [string range $bl [shrink + 13 "<SERVERTITLE>" 0 $bl] [shrink - 1 "</SERVERTITLE>" 0 $bl]]"
- set sgenre "sgenre: [string range $bl [shrink + 13 "<SERVERGENRE>" 0 $bl] [shrink - 1 "</SERVERGENRE>" 0 $bl]]"
- }}
- close $sock
- }
- set temp [open "isonline" w+]
- puts $temp "$streamstatus\n$repl\n$curhigh\n$cursong\n$bitrate\n$stitle\n$sgenre\n$surl"
- close $temp
- if {$announce == 1 } {
- if {$streamstatus == "isonline: 0" && $oldisonline == "isonline: 1"} {
- poststuff privmsg $offlinetext
- if {$doalertadmin == "1"} { sendnote domsen $alertadmin "La radio Esta Ahora APAGADA" }
- if {$urltopic == 1} { poststuff topic $offlinetopic }
- }
- if {$streamstatus == "isonline: 1" && $oldisonline == "isonline: 0" } {
- if {$sgenre != ""} {
- set sgenre " ([lrange $sgenre 1 [llength $sgenre]] )"
- }
- poststuff privmsg "$onlinetext"
- if {$urltopic == 1} { poststuff topic "$onlinetopic" }
- }}
- if {($tellusers == 1) && ($streamstatus == "isonline: 1") && ($oldcurhigh != "curhigh: 0") } {
- if {$oldcurhigh != $curhigh} {
- poststuff privmsg ""
- #poststuff privmsg "Posibles Oyentes: [lindex $curhigh 1]"
- }
- if {$oldcurlist != $repl} {
- poststuff privmsg ""
- #poststuff privmsg " Actualmente hay : 4 [lindex $repl 1] ($currentl) Oyentes"
- }}
- if {($tellsongs == 1) && ($oldsong != $cursong) && ($streamstatus == "isonline: 1") } {
- if {$songurl != ""} { set songurl " ($songurl)"}
- regsub -all "<" $cursong "<" cursong
- regsub -all ">" $cursong ">" cursong
- regsub -all "&" $cursong "+" cursong
- regsub -all """ $cursong "\"" cursong
- regsub -all "'" $cursong "'" cursong
- regsub -all "ÿ" $cursong "" cursong
- regsub -all "´" $cursong "´" cursong
- regsub -all "–" $cursong "-" cursong
- regsub -all "ö" $cursong "ö" cursong
- regsub -all "ä" $cursong "ä" cursong
- regsub -all "ü" $cursong "ü" cursong
- regsub -all "Ö" $cursong "Ö" cursong
- regsub -all "Ä" $cursong "Ä" cursong
- regsub -all "Ü" $cursong "Ü" cursong
- regsub -all "ß" $cursong "ß" cursong
- putlog $cursong
- #poststuff privmsg "3***2 Radio 3*** 10 @@@ 4 #LC-LESBIANAS IRC-HISPANO 10@@@ 1Escuchanos entrando a4 http://www.lc-lesbianas.tk/ 6 el DJ es $dj2 Cancion Actual: [lrange $cursong 1 [llength $cursong]] 1/Facebook del canal: 4 https://www.facebook.com/radioenigmaonair"
- #poststuff privmsg "1Quieres Escuchar La Radio IRC Haz Doble Click en ->> 12 http://194.110.67.155:7500/listen.pls ... La Actual Canción es: 4 [lrange $cursong 1 [llength $cursong]] .. Para Ver Comandos de la Radio Teclea 6!radio "
- }
- if {($tellbitrate == 1) && ($oldbitrate != $bitrate) && ($streamstatus == "isonline: 1") && ($oldbitrate != "bitrate: 0")} {
- poststuff privmsg "Calidad Sonido a [lindex $bitrate 1]kbps"
- }}}
- putlog "-= Cargado: shoutcast.tcl Por *#Ayuda-eggdrop* =-"
Add Comment
Please, Sign In to add comment