IceCast Server Info

By OrFeAsGr on Dec 19, 2016

IceCast Server Info mIRC Script by OrFeAsGr
Simply Insert your server and your server port in the $my_icecast_url and $my_icecast_port respectively
;;;;;;; Small fixes ;;;;;;;;;;;;;;;;;;;;;
SMALL FIX OF MY MESSY SCRIPTING 21/12/2016 >
Add the channel where you want the announcement to be sent in $my_icecast_chan
Fixed some silly mistakes
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
To start the check do /ice_check
Will check every some minutes!
Enjoy!
Visit my website: http://humanity.ucoz.com For more mIRC Scripts!
Thx!!!

ON *:SOCKOPEN:radio: {
  sockwrite -nt $sockname GET /status-json.xsl HTTP/1.1 
  sockwrite -nt $sockname Host: $my_icecast_url
  sockwrite -nt $sockname Connection: Close
  sockwrite $sockname $crlf
}

ON *:SOCKREAD:radio: {
  var %radio | sockread %radio 
}

ON *:SOCKCLOSE:radio: {
  var %radio | sockread -f %radio
  var %x = 1
  while (%x <= $numtok(%radio,34)) {
    var %g = $gettok(%radio,%x,34)
    if (%g != :) && (%g != ,) && (%g != dummy) && (*null* !iswm  %g) && (%g != :{) && (%g != $chr(123)) {
      if (icestats == %g) { set %icestats 1 }
      if (%icestats == 1) && (%g != icestats) {
        if (!%admin) { inc %admin 1 }
        if (%admin) { if (!%itva) { inc %itva 1 | set %citem %g }
          elseif (%itva) { 
            if (%citem == server_name) { set %servername $replace(%g,$chr(32),chr(32)) }
            if (%citem == title) { set $+(%,title,%servernaname) %g }
            if (%citem == ice-bitrate) { set  $+(%,ice-bitrate,%servername) $remove(%g,:,$chr(44)) }
            if (%citem == ice-channels) { set  $+(%,ice-channels,%servername) $remove(%g,:,$chr(44)) }
            if (%citem == ice-samplerate) { set  $+(%,ice-samplerate,%servername) $remove(%g,:,$chr(44)) }
            if (%citem == ice-url) { set  $+(%,ice-url,%servername) %g }
            if (%citem == listener_peak) { set  $+(%,listener_peak,%servername) $remove(%g,:,$chr(44)) }
            if (%citem == listeners) { set  $+(%,listeners,%servername) $remove(%g,:,$chr(44)) 
              msg $my_icecast_chan $replace(%servername,chr(32),$chr(32)) Now Playing: $($+(%,title,%servernaname),2) BitRate: $($+(%,ice-bitrate,%servername),2) Channels: $($+(%,ice-channels,%servername),2) SampleRate: $($+(%,ice-samplerate,%servername),2) Listeners: $($+(%,listeners,%servername),2) (Peak: $($+(%,listener_peak,%servername),2) )
              msg $my_icecast_chan Listen @ $($+(%,ice-url,%servername),2)
              unset $+(%,*,%servername)
              unset %servername
            }
            unset %citem %itva
          }
        }
      }
    }
    inc %x
  }
  unset %admin %icestats
}

alias my_icecast_url {
  ;;Input your server's URL below (don't erase "return") >> DON'T INCLUDE THE :PORT <<
  return INPUT_YOUR_URL_HERE
}

alias my_icecast_port {
  ;;Input  below the port that the server is listening to (don't erase "return")
  return INPUT_YOUR_PORT_HERE
}

alias my_icecast_chan {
  ;;Input your the channel(s) you want the messages to be sent in below
  ;;For multiple channels seperate with a comma , (e.g #chan1,#chan2,#chan3
  return INPUT_YOUR_CHAN(s)_HERE
}

alias ice_check { 
if (!%ice_check) {
set %ice_check 1
.timerice_check 0 250 sockopen radio $my_icecast_url $my_icecast_port
echo -at Ice Cast Info Is Now On!
}
elseif (%ice_check) {
unset %ice_check
.timerice_check off
echo -at Ice Cast Info Is Now Off!
}
}

Want to get me some income without actually paying for anything? Visit my website with your ad block off watch an ad by shorte.st and turn it back on! Or/and use my URL shortener to share your links easier!! Thx!!

Or do you want to donate some bucks because you like my scripts??? Visit https://www.paypal.me/OrFeAsGr
Thx! ^_^

Comments

Sign in to comment.
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.