egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

my radio tcl is not working

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
RaimondRaj
Voice


Joined: 28 Aug 2019
Posts: 2

PostPosted: Wed Sep 07, 2022 3:58 pm    Post subject: my radio tcl is not working Reply with quote

Listening for telnet connections on 0.0.0.0 port 12345 (all).
Loading dccwhois.tcl...
Loaded dccwhois.tcl
Tcl error in file 'rythmmixfm.conf':
error "no element found" at line 1 character 0
while executing
"dom parse $urldata"
(procedure "pub:announce" line 6)
invoked from within
"pub:announce"
(file "scripts/rythmmixfm.tcl" line 240)
invoked from within
"source scripts/rythmmixfm.tcl"
(file "rythmmixfm.conf" line 387)
* CONFIG FILE NOT LOADED (NOT FOUND, OR ERROR)
rythmmixfm@www:~/eggdrop$
Back to top
View user's profile Send private message
SpiKe^^
Owner


Joined: 12 May 2006
Posts: 809
Location: Tennessee, USA

PostPosted: Wed Sep 07, 2022 4:59 pm    Post subject: Reply with quote

Post the entire tcl script and any other info you have to this forum thread,
then maybe someone can try to help:)
_________________
SpiKe^^

Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
.
Back to top
View user's profile Send private message Visit poster's website
RaimondRaj
Voice


Joined: 28 Aug 2019
Posts: 2

PostPosted: Wed Sep 14, 2022 5:19 am    Post subject: i dont what happen Reply with quote

Code:
# This is an advance version of SHOUTcast TCL made by breeze breeze@bluemoon-radio.de

# Return information about SHOUTcast DNAS Server 2 (last Build 29)
#
# It requires tDOM.
# On Debian install it by apt-get install tdom
# I dont know other OS
# You will find the Source of tDOM on https://github.com/tDOM/tdom/#
#
# If you have any suggestions you can find us on IRC Network (Dalnet) irc.dal.net:6667 channel #Cyberhosters (Nick: Adeel / Mezen)
# or via mail Adeel@cyberhosters.org
#
# Script Orgionally Coded By: breeze breeze@bluemoon-radio.de
# Script Modified / Advanced by Mezen
# Script Modification Idea by Adeel adeel@cyberhosters.org
#
# Download the modified version from http://cyberhosters.org/downloads.php
#
# =========================================================================
#               ORIGIONAL VERSION (Breeze)
# =========================================================================
# Version 0.1
# !info misc
# Return misc information like listener, peak, current track, bitrate, etc....
#
# Version 0.2
# !info history
# Return Songhistory
#
#
# Version 0.3
# !info listener
# Return Listeners with ip and connect time
#
# =========================================================================
#               MODIFIED VERSION (Mezen / Adeel)
# =========================================================================
#
# Version 0.4
# Add a routine to announce the current song, bitrate and listeners
# Add a routine to advertise radio url

# channel for annoucements
set scserv(chan)        "#SakthiMedia"

# time in seconds between each song change check
set scserv(time)        10


# time in minutes between each chan advertisement
set scserv(advtime)      5

### settings of your admin connect to SHOUTcast Server
set scserv(pass)        "mypass"
set scserv(url)         "http://ip"
set scserv(port)        "8808"
set scserv(version)     "0.4"

set cmdchar "!"

#### Just edit from this line below if you know what you do ;) ####

package require http
package require tdom
 
proc notice {who what} {
   putserv "NOTICE $who :$what"
}
 
proc say {who what} {
   putserv "PRIVMSG $who :$what"
}
 
proc duration {s} {
   if {![string is double $s]} { return $s }
   set hours [expr {$s / 3600}]
   set minutes [expr {($s / 60) % 60}]
   set seconds [expr {$s % 60}]
   set res ""
   if {$hours != 0} {append res "$hours hours"}                           
   if {$minutes != 0} {append res " $minutes minutes"}
   if {$seconds != 0} {append res " $seconds seconds"}
   return $res
}

bind pub - "[string trim $cmdchar]info" pub:info

proc pub:info {nick host hand chan arg} {
   http::config -useragent "Mozilla 9.0"
   set con [http::geturl $::scserv(url):$::scserv(port)/admin.cgi?pass=$::scserv(pass)&sid=1&mode=viewxml&page=9 -timeout 10000]
   set urldata [http::data $con]
   http::cleanup $con
   set doc [dom parse $urldata]
   set root [$doc documentElement]
   set cmd [lindex $arg 0]
   switch -- $cmd {
      "misc" {
         catch { notice $nick "Listener: [[$root selectNodes /SHOUTCASTSERVER/CURRENTLISTENERS/text()] data]" }
         catch { notice $nick "Max.: [[$root selectNodes /SHOUTCASTSERVER/MAXLISTENERS/text()] data]" }
         catch { notice $nick "Peak: [[$root selectNodes /SHOUTCASTSERVER/PEAKLISTENERS/text()] data]" }
         catch { notice $nick "Unique: [[$root selectNodes /SHOUTCASTSERVER/UNIQUELISTENERS/text()] data]" }
         catch { notice $nick "Genre: [[$root selectNodes /SHOUTCASTSERVER/SERVERGENRE/text()] data]" }
         catch { notice $nick "Url: [[$root selectNodes /SHOUTCASTSERVER/SERVERURL/text()] data]" }
         catch { notice $nick "Tital: [[$root selectNodes /SHOUTCASTSERVER/SERVERTITLE/text()] data]" }
         catch { notice $nick "Track: [[$root selectNodes /SHOUTCASTSERVER/SONGTITLE/text()] data]" }
         catch { notice $nick "next Track: [[$root selectNodes /SHOUTCASTSERVER/NEXTTITLE/text()] data] (if playlist is connected)" }
         catch { notice $nick "Status: [[$root selectNodes /SHOUTCASTSERVER/STREAMSTATUS/text()] data]" }
         catch { notice $nick "MP3: $::scserv(url):$::scserv(port)[[$root selectNodes /SHOUTCASTSERVER/STREAMPATH/text()] data]" }
         catch { notice $nick "Bitrate: [[$root selectNodes /SHOUTCASTSERVER/BITRATE/text()] data] kb/s" }
         catch { notice $nick "Codec: [[$root selectNodes /SHOUTCASTSERVER/CONTENT/text()] data]" }
         catch { notice $nick "Version: [[$root selectNodes /SHOUTCASTSERVER/VERSION/text()] data]" }
      }
      "listener" {
         catch { notice $nick "-- \002LISTENER\002" }
         catch { notice $nick "IP | CONNECTED | PLAYER" }
         foreach node [$root selectNodes /SHOUTCASTSERVER/LISTENERS/LISTENER] {
            foreach node2 {HOSTNAME CONNECTTIME USERAGENT} {
               set getnode [$node selectNodes $node2]
               if {[llength $getnode] > 0} {
                  lappend nodeList [join [$getnode text]]
               } else {
                  lappend nodeList N/A
               }
            }
         }
         foreach {a b c} $nodeList {
            catch { notice $nick "$a | [duration $b] | $c" }
         }
      }
      "history" {
         set nodeList ""
         catch { notice $nick "-- \002SONGHISTORY\002" }
         catch { notice $nick "AT | TITLE" }
         foreach node [$root selectNodes /SHOUTCASTSERVER/SONGHISTORY/SONG] {
            foreach node2 {PLAYEDAT TITLE} {
               set getnode [$node selectNodes $node2]
               if {[llength $getnode] > 0} {
                  lappend nodeList [join [$getnode text]]
               }
            }
         }
         foreach {a b} $nodeList {
            catch { notice $nick "[clock format $a -format {%H:%M:%S}] | $b|" }
         }
      }
      "default" {
         catch { notice $nick "!info misc|listener|history" }
      }
   }
}

proc pub:announce {} {
   http::config -useragent "Mozilla 9.0"
   set con [http::geturl $::scserv(url):$::scserv(port)/admin.cgi?pass=$::scserv(pass)&sid=1&mode=viewxml&page=1 -timeout 10000]
   set urldata [http::data $con]
   http::cleanup $con
   set doc [dom parse $urldata]
   set root [$doc documentElement]
   set chan $::scserv(chan)
   
   if {![botonchan $chan]} {
      utimer $::scserv(time) pub:announce
      return
   }
   
   set status 0
   set song ""
   set listeners "Unknown"
   set bitrate "Unknown"
   set test 0
   
   catch { set status "[[$root selectNodes /SHOUTCASTSERVER/STREAMSTATUS/text()] data]" }
   
   if {![info exists ::scserv(status)]} {
      set ::scserv(status) $status
   } elseif { $::scserv(status) != $status } {
      if { $status  == 1 } {
         catch { say $chan "Radio Link 8https://www.sakthimedia.com/rythmmixfm" }
      } else {
         catch { say $chan "Radio Link 8https://www.sakthimedia.com/rythmmixfm" }
      }
      set ::scserv(status) $status
   }
   
   if {$status == 0} {
      utimer $::scserv(time) pub:announce
      return
   }
   
   catch { set song "[[$root selectNodes /SHOUTCASTSERVER/SONGTITLE/text()] data]" }
   catch { set listeners "[[$root selectNodes /SHOUTCASTSERVER/CURRENTLISTENERS/text()] data]" }
   catch { set bitrate "[[$root selectNodes /SHOUTCASTSERVER/BITRATE/text()] data] kb/s" }
   
   if {$song == ""} {
      utimer $::scserv(time) pub:announce
      return
   }
   
   if {![info exists ::scserv(song)]} {
      set ::scserv(song) $song
      set test 1
   } elseif { $::scserv(song) != $song } {
      set ::scserv(song) $song
      set test 1
   }
   
   if {![info exists ::scserv(listeners)]} {
      set ::scserv(listeners) $listeners
      set test 1
   } elseif { $::scserv(listeners) != $listeners } {
      set ::scserv(listeners) $listeners
      set test 1
   }
   
   if {$test == 1} {
      # set annoucements here
      catch { say $chan "81@ 8Rythm For Your life 3| 14Listeners :118 $listeners 6- 14Now Playing4 $song" }
   }
   
   utimer $::scserv(time) pub:announce
}

proc pub:advertise {} {
   set chan $::scserv(chan)
   set url "$::scserv(url):$::scserv(port)/listen.pls"
   
   if {![info exists ::scserv(status)]} {
      set ::scserv(status) 0
   }
   
   if {![botonchan $chan] || $::scserv(status) == 0} {
      timer $::scserv(advtime) pub:advertise
      return
   }
   
   catch { say $chan "1,13[6]13,6[14]14,1[ 15Support Us Via 11FB0/11Insta0/11Tw 9: 8@SakthiMedia 14,1]14,6[13]6,13[1]" }
   timer $::scserv(advtime) pub:advertise
}

pub:announce
pub:advertise
 
putlog "loaded sc_serv_control.tcl $::scserv(version) successfully"
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber