Jump to content

Archived

This topic is now archived and is closed to further replies.

chain

Shoutcast Script on Dialog

Recommended Posts

  • Administrators

An easy to use script to show whats playing on your shoutcast stream with an easy to use dialog.

 

 

 

>[script]n0=n1=alias -l kamer { return %radioroom }n2=n3=; Vul Hieronder Het Ip Adres In Van Je Shoutcast Servern4=alias -l shoutcast.ip { return %ipstream }n5=n6=; Vul Hieronder De Poort In Van Je Shoutcast Servern7=alias -l shoutcast.poort { return %streamport }n8=n9=; Vul Hieronder Het Admin Paswoord In Van Je Shoutcast Servern10=alias -l shoutcast.paswoord { return %streampasswd }n11=n12=; Onderstaande Niet Wijzigen Mits Je Er Verstand Van Hebt :Pn13=n14=alias -l webradio { return shoutcast }n15=alias -l verkrijgxml {n16=  var %tag.open = $+(<, $1, >)n17=  var %tag.sluiten = $+(</, $1, >)n18=  if ($pos($2-,%tag.open)) {n19=    var %start = $ifmatch + $len(%tag.open)n20=    var %lengte  = $calc($pos($2-, %tag.sluiten) - %start)n21=    return $mid($2-, %start, %lengte)n22=  }n23=  return $nulln24=}n25=n26=on 1:SOCKOPEN:$($webradio): {n27=  sockwrite -n $sockname GET $+(/admin.cgi?pass=,$shoutcast.paswoord,&mode=viewxml HTTP/1.1)n28=  sockwrite -n $sockname Host: $+($shoutcast.ip, :, $shoutcast.poort)n29=  sockwrite -n $sockname User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040614 Firefox/0.8n30=  sockwrite -n $sockname *.*, */*n31=  sockwrite -n $sockname Accept-Language: en-us,en;q=0.5n32=  sockwrite -n $sockname Accept-Encoding: gzip,deflaten33=  sockwrite -n $sockname Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7n34=  sockwrite -n $sockname Keep-Alive: 300n35=  sockwrite -n $sockname Connection: keep-aliven36=  sockwrite -n $sockname $crlfn37=}n38=n39=on 1:SOCKREAD:$($webradio): {n40=  var %datan41=  sockread -f %datan42=  while (($sockbr > 0) && ($sockerr == 0)) {n43=    if ($verkrijgxml(SERVERTITLE, %data) != $null) {n44=      %servernaam = $ifmatchn45=    }n46=    if ($verkrijgxml(CURRENTLISTENERS, %data) != $null) {n47=      %luisteraars = $ifmatchn48=    }n49=    if ($verkrijgxml(SONGTITLE, %data) != $null) {n50=      %titel = $ifmatchn51=    }n52=    if ($verkrijgxml(PEAKLISTENERS, %data) != $null) {n53=      %piekluisteraars = $ifmatchn54=    }n55=    sockread -f %datan56=  }n57=}n58=on 1:SOCKCLOSE:$($webradio): {n59=  %nieuw = %titeln60=  %nieuweluisteraars = %luisteraarsn61=  %nieuweservertitle = %servernaamn62=  %nieuwepiek = %piekluisteraarsn63=  ;n64=  ;check hier de nieuwe dj -- Dit Mag Je Wijzigen --n65=  ;n66=  if (%nieuweservertitle != %oudeservertitle) { n67=    /msg #streamroom 6 Nieuwe DJ : -=> $+ %nieuweservertitle $+ <=-n68=    %oudeservertitle = %servernaamn69=    unset %nieuweservertitlen70=  }n71=  ;n72=  ;check hier de nieuwe luisteraars -- Dit Mag Je Wijzigen --n73=  ;n74=n75=  ;check hier de nieuwe titel -- Dit Mag Je Wijzigen --n76=  ;n77=  if (%nieuw != %oud) {n78=    /msg %streamroom 6 $replace(%nieuw,$chr(38) $+ $chr(35) $+ 039 $+ $chr(59),$chr(39),$chr(38) $+ quot $+ $chr(59),$chr(34),$chr(38) $+ amp $+ $chr(59),$chr(38),”,$chr(34),'n,',“,$chr(34)) n79=    %oud = %titeln80=    unset %nieuwn81=  }n82=  ;n83=}n84=alias webradiotimer { sockopen $webradio $shoutcast.ip $shoutcast.poort }n85=on *:connect:{n86=  .timerwebradio 0 5 /webradiotimern87=}n88=n89=n90=alias ikke { /dialog -m streamdialog streamdialog }n91=dialog streamdialog {n92=  size -1 -1 180 170n93=  option dbun94=  title "WiSHMaSTeR SHouTCaST" n95=  button "Cancel" 1, 145 145 20 10,ok flatn96=  edit "" 2, 62 10 90 10, autohsn97=  text "Stream IP/HOST:" 4, 15 10 45 10,n98=  edit "" 3, 62 25 90 10, autohsn99=  text "Stream Poort  :" 5, 15 25 45 10, n100=  edit "" 6, 62 40 90 10, autohsn101=  text "Stream Password  :" 7, 15 40 45 10,n102=  text "Stream Kamer :" 13, 15 55 45 10,n103=  edit "" 15, 62 55 90 10, autohsn104=  button "Save" 10, 25 90 30 10, flatn105=  button "Clear" 20, 60 90 30 10, flatn106=}n107=n108=on *:dialog:streamdialog:sclick:10:{n109=  if ($did($dname,2) == $null) { echo -a 6No IP/Host entered }n110=  else {n111=    set %ipstream $did($dname,2)n112=    did -ra $dname 2 %ipstreamn113=  }n114=  if ($did($dname,3) == $null) { echo -a 6No Streamport entered }n115=  else {n116=    set %streamport $did($dname,3)n117=    did -ra $dname 3 %streamportn118=  }n119=  if ($did($dname,6) == $null) { echo -a 6No password Entered  }n120=  else {n121=    set %streampasswd $did($dname,6)n122=    did -ra $dname 6 %streampasswdn123=  }n124=n125=  if ($did($dname,15) == $null) { echo -a 6No Streamroom entered }n126=  else {n127=    set %streamroom $did($dname,15)n128=    did -ra $dname 15 %streamroomn129=  }n130=  dialog -c streamdialog streamdialogn131=}n132=n133=on *:dialog:streamdialog:init:*:{n134=  did -a $dname 2 %ipstreamn135=  did -a $dname 3 %streamportn136=  did -a $dname 6 %streampasswdn137=  did -a $dname 15 %streamroomn138=}n139=n140=menu query,nicklist,channel,menubar {n141=  Radio Setup:/ikken142=}

Link to comment
Share on other sites



×
×
  • Create New...