mIRC Radio Bot v3.0

By ProIcons on Aug 23, 2011

RadioBot 3.1


Configure:
Just set them from the Popping up Dialog and hit Save to apply changes. You can also access Configuration Tool by Right Clicking anywhere RadioBot -> Panel

Features:

  • Auto announce (for songs on the shoutcast stream)
  • Support for ShoutCast + Icecast All Current Versions
  • Easy Development

Commands:
!song - notices user current song
!tune/!url/!listen - notices user the link to the stream
!listeners - notices the user with current listener amount
!stats/!info/!status - notices user a quick summary of stream info (dj, genre, bitrate, listeners, etc)

Development:
function void fetchData : Fetch Data from the Server using the best method is available (json/xml)
callback function void title_callback : Fired when title changes
function string object_read([XML/JSON Object]/[File]/[URL],XML/JSON,Keys...)[.auth(base64_authstring).nocache()] : Gets from the first argument, an object, and decodes it based on 2nd argument either json or xml, and gets the given keys. Keys are separated with comma (,) and it gets unlimited keys. Auth Property used to trigger a HTTP basic authentication with the given base64_encoded string, and nocache() is used to override the default cache feature of the Mircosoft http object.
HashTable Radio : Contains Listeners,Peak,Max(Listeners),Title,Artist,Bitrate,Genre,URL Fields are getting parsed by fetchData


Changelog:
3.1
Fixed stability.

3.0
Rebuild of the Core
-VBScript Sockets are now used instead of mIRC
-Inner Parsing System Rebuilt
-Dialog Panel Rebuilt
-IRC Auto Connect/Identify Removed
-Kick Stream Removed
-DJ Management System Removed

2.1
Fixed Bug that didn't read data from ShoutCast 2.* Server

2.0 - My Version
-Compatible with ShoutCast 1.
-Compatible With ShoutCast 2.

-Compatible With IceCast
-New XML Parser
-New Socket System
-New Text Management System
-Dialog Panel Added

1.1
Rewrote the XML parser which fixes the song announce loop.

1.0.1
Fixed issue with topic not updating properly.

1.0
Initial version.

; This code is released under the public domain.

;:::::::::::::::::::::
;:  Load variables  ::
;:::::::::::::::::::::
menu * {
  Radio Bot 3.0
  .Panel:/dialog -m panel panel
}
alias _radio.init {
  if (!%_radio.configured) {
    set %_radio.ip 127.0.0.1
    set %_radio.port 8000
    set %_radio.server SC1
    set %_radio.irc.channel #radio
    set %_radio.username admin
    set %_radio.password admin
    set %_radio.sid 1
    set %_radio.mount /live
    dialog -md Panel panel
  }
}
on *:start: {
  _radio.init
}
on *:connect:{
  .timer[Radio] 0 10 fetchData
}

on *:text:*:%_server.irc.channel:{
  elseif ($1 == !info || $1 == !stats || $1 == !status) {
    if ($hget(Radio,Listeners)) { 
      notice $nick Listen URL: $hget(Radio,URL)
      notice $nick Title: $hget(Radio,Artist) $hget(Radio,Title) Bitrate: $hget(Radio,Bitrate) $+ kbps Listeners: $hget(Radio,Listeners) $+ / $+ $iif($hget(Radio,Max) == unlimited,oo,$v1) Peak: $hget(Radio,Peak)
    }
    else { notice $nick Stream is offline or Stream Info is not available. }
  }
  elseif ($1 == !song) {
    if ($hget(Radio,Title)) {
      notice $nick Now Playing: $v1
    }
    else { notice $nick Stream is offline or Song title is not available. }
  }
  elseif ($1 == !Tune) || ($1 == !url) || ($1 == !listen) { notice $nick Listen at: $hget(Radio,URL) }
  elseif ($1 == !listeners) { 
    if ($hget(Radio,Listeners)) { notice $nick Listeners: $hget(Radio,Listeners) $+ / $+ $iif($hget(Radio,Max) == unlimited,oo,$v1) Peak: $hget(Radio,Peak)
    }
    else { notice $nick Stream is offline or Stream Info is not available. }
  }
}

alias fetchData {
  var %url = $+(http://,%_radio.ip,:,%_radio.port)
  if (%_radio.server == SC1) {
    var %mode = XML
    var %Source = $+(%url,/admin.cgi?mode=viewxml)
    var %prop = $+(.auth,$chr(40),$encode($+(%_radio.username,:,%_radio.password),m),$chr(41),.nocache,$chr(40),$chr(41))
    var %container SHOUTCASTSERVER
    var %_lC = CURRENTLISTENERS
    var %_lP = PEAKLISTENERS
    var %_lM = MAXLISTENERS
    var %_TI = SONGTITLE
    var %_ST = CONTENT
    var %_BR = BITRATE
    var %_GE = SERVERGENRE

  }
  elseif (%_radio.server == SC2) {
    var %Source = $+(%url,/statistics?json=1)
    var %result = $objet_read(%url,json,totalstreams)
    if (%result != null) {
      set %_radio.server SC2J
    }
    else {
      set %_radio.server SC2X
    }
  }
  if (%_radio.server == SC2X) {
    var %Source = $+(%url,/admin.cgi?sid=,%_radio.sid,&mode=viewxml)
    var %mode = XML
    var %prop = $+(.auth,$chr(40),$encode($+(%_radio.username,:,%_radio.password),m),$chr(41),.nocache,$chr(40),$chr(41))
    var %container SHOUTCASTSERVER
    var %_lC = CURRENTLISTENERS
    var %_lP = PEAKLISTENERS
    var %_lM = MAXLISTENERS
    var %_SP = STREAMPATH
    var %_TI = SONGTITLE
    var %_ST = CONTENT
    var %_BR = BITRATE
    var %_GE = SERVERGENRE

  }
  elseif (%_radio.server == SC2J) {
    var %Source = $+(%url,/statistics?json=1)
    var %x = 0
    while ($object_read(%source,json,streams,%x).nocache()) {
      if ($nopath($object_read(%source,json,streams,%x,id)) == %_radio.sid) {
        var %found = 1
        break
      }
      inc %x
    }
    if (%found) {
      var %container streams, $+ %x
    }
    var %_lC = currentlisteners
    var %_lP = peaklisteners
    var %_lM = maxlisteners
    var %_SP = streampath
    var %_TI = songtitle
    var %_ST = content
    var %_BR = bitrate
    var %_GE = servergenre
    var %mode = JSON

  }
  elseif (%_radio.server == IC) {
    var %Source = $+(%url,/status-json.xsl)
    var %result = $objet_read(%url,json,icestats)
    if (%result) {
      set %_radio.server ICJ
    }
    else {
      set %_radio.server ICX
    }
  }
  if (%_radio.server == ICJ) {
    var %Source = $+(%url,/status-json.xsl)
    var %mode = JSON
    var x = 0
    while ($object_read(%source,json,icestats,source,%x).nocache()) {
      if ($nopath($object_read(%source,json,icestats,source,%x,listenurl)) == %_radio.mount) {
        var %found = 1
        break
      }
      inc %x
    }
    if (%found) {
      var %container icestats,source, $+ %x
    }
    var %_lC = listeners
    var %_lP = listener_peak
    var %_lM = max_listeners
    var %_lU = listenurl
    var %_TI = title
    var %_AR = artist
    var %_ST = server_type
    var %_BR = ice-bitrate
    var %_GE = genre
  }
  elseif (%_radio.server == ICX) {
    var %Source = $+(%url,/admin/stats)
    var %mode = XML
    var %prop = $+(.auth,$chr(40),$encode($+(%_radio.username,:,%_radio.password),m),$chr(41),.nocache,$chr(40),$chr(41))
    var %container = $+(icestats/source[@mount=[',%_server.mount,'])
    var %_lC = listensers
    var %_lP = listener_peak
    var %_lM = max_listeners
    var %_lU = listenurl
    var %_TI = title
    var %_AR = artist
    var %_ST = server_type
    var %_BR = ice-bitrate
    var %_GE = genre
  }
  if (%container) {
    hadd -m Radio Listeners $object_read(%source,%mode,%container,%_lC) [ $+ [ %prop ] ]
    hadd -m Radio Peak $object_read(%source,%mode,%container,%_lP) [ $+ [ %prop ] ]
    hadd -m Radio Max $object_read(%source,%mode,%container,%_lM) [ $+ [ %prop ] ]

    if (%_AR) {
      hadd -m Radio Artist $object_read(%source,%mode,%container,%_AR) [ $+ [ %prop ] ]
    }
    hadd -m Radio Type $object_read(%source,%mode,%container,%_ST) [ $+ [ %prop ] ]
    hadd -m Radio Bitrate $object_read(%source,%mode,%container,%_BR) [ $+ [ %prop ] ]
    if (%_lU) {
      hadd -m Radio URL $object_read(%source,%mode,%container,%_lU) [ $+ [ %prop ] ]
    }
    elseif (%_SP) {
      var %sp = $object_read(%source,%mode,%container,%_SP) [ $+ [ %prop ] ]
      hadd -m Radio URL $+(http://,%_radio.ip,:,%_radio.port,%sp)
    }
    else {
      hadd -m Radio URL $+(http://,%_radio.ip,:,%_radio.port,/listen.pls)
    }
    var %Title = $object_read(%source,%mode,%container,%_TI) [ $+ [ %prop ] ]
    if ($hget(Radio,Title) != %Title && %Title) { title_callback |   hadd -m Radio Title %Title }
    if (!%Title) {
      if ($hget(Radio)) hfree Radio
    }

  }
}
alias title_callback {
  if ($me ison %_radio.irc.channel) msg %_radio.irc.channel Song Playing Now: $hget(Radio,Title)
}

;:::::::::::::::::::::::
;:  Dialog functions  ::
;:::::::::::::::::::::::

dialog Panel {
  title "Radio Bot Config"
  size -1 -1 87 137
  option dbu
  text "mIRC Radio Bot 2.2", 1, 0 0 87 8, center
  box "Radio Configuration", 2, 0 9 87 101
  text "Server", 4, 2 18 25 8
  combo 3, 2 26 82 37, size drop
  button "Save", 5, 25 124 37 12
  edit "", 6, 30 37 50 10
  text "Address", 7, 2 38 25 8
  text "Port", 8, 2 50 25 8
  edit "", 9, 30 49 50 10
  box " Administration Crendentials", 10, 2 63 82 33
  edit "", 11, 30 71 50 10
  text "Username", 12, 4 72 25 8
  text "Password", 13, 4 84 25 8
  edit "", 14, 30 83 50 10, password
  edit "", 15, 30 97 50 10
  text "SID", 16, 2 98 25 8
  text "IRC Channel", 17, 0 113 32 8
  edit "", 18, 30 111 50 10
}

on *:dialog:Panel:*:*:{
  if ($devent == init) {
    did -a $dname 3 Shoutcast 1.*
    did -a $dname 3 Shoutcast 2.*
    did -a $dname 3 Icecast
    if (%_radio.server == SC1) {
      did -c $dname 3 1
      did -h $dname 15,16 
      did -a $dname 15 %_radio.sid
    }
    elseif ($left(%_radio.server,3) == SC2) {
      did -c $dname 3 2
      did -v $dname 15,16
      did -a $dname 15 %_radio.sid 
    }
    elseif ($left(%_radio.server,2) == IC) {
      did -c $dname 3 3
      did -v $dname 15,16
      did -ra $dname 16 Mount
      did -a $dname 15 %_radio.mount
    }
    did -a $dname 6 %_radio.ip
    did -a $dname 9 %_radio.port
    did -a $dname 11 %_radio.username
    did -a $dname 14 %_radio.password
    did -a $dname 18 %_radio.irc.channel
  }

  if ($devent == sclick) {
    if ($did == 3) {
      if ($did($dname,3).sel == 3) { did -ra $dname 16 Mount | did -ra $dname 15 %_radio.mount | did -v $dname 15,16 }
      elseif ($did($dname,3).sel == 2) {
        did -ra $dname 16 SID | did -ra $dname 15 %_radio.sid | did -v $dname 15,16
      }
      else {
        did -h $dname 15,16
      }
    }
    if ($did == 5) { 
      if ($verifyFields($dname,6.9.11.14.15.18)) {
        if ($did($dname,3).sel == 1) { var %req = /admin.cgi?mode=viewxml | var %check SHOUTCASTSERVER/CURRENTLISTENERS }
        elseif ($did($dname,3).sel == 2) { var %req = /admin.cgi?sid= $+ $did($dname,15) $+ &mode=viewxml | var %check SHOUTCASTSERVER/CURRENTLISTENERS }
        else { var %req = /admin/stats | var %check icestats/admin }
        var %url = $+(http://,$did($dname,6),:,$did($dname,9),%req)
        if ($object_read(%url,XML,%check).auth( [ $+ [ $encode($+($did($dname,11),:,$did($dname,14)),m) ] ] [ $+ [ ).nocache() ] ] != $null) {
          set %_radio.ip $did($dname,6)
          set %_radio.port $did($dname,9)
          set %_radio.username $did($dname,11)
          set %_radio.password $did($dname,14)
          set %_radio.irc.channel $did($dname,18)
          set %_radio.configured $true

          if ($did($dname,3).sel == 1) {
            if ($left(%_radio.server,3) != SC1) {
              set %_radio.server SC1
            }
            set %_radio.sid $did($dname,15)
          }
          elseif ($did($dname,3).sel == 2) {
            if ($left(%_radio.server,3) != SC2) {
              set %_radio.server SC2
            }
            set %_radio.sid $did($dname,15)
          }

          elseif ($did($dname,3).sel == 3) {
            if ($left(%_radio.server,2) != IC) {
              set %_radio.server IC
            }
            set %_radio.mount $did($dname,15)
          }
          noop $input(Radio Bot Connected successfully to your Server. $+ $crlf $+ Configuration Saved. Configuration Wizard will now close.,oi,Radio Bot 3.0)
          .timer[Radio] 0 10 fetchData
          dialog -x $dname
        }
        else {
          noop $input(Radio Bot was unable to connect to your Server. $+ $crlf $+ Please check your configuration and try again,ow,Radio Bot 3.0)
        }
      }
    }
  }

}

alias verifyFields {
  var %i = 1
  var %d = $1
  var %z = $2
  while (%i <= $numtok(%z,46) ) {
    if (!$did(%d,$gettok(%z,%i,46))) {
      return $false
    }
    inc %i
  }
  return $true
}
alias object_read {
  if ($isid) {
    var %source = $1
    var %type = $2
    var %handler = utf8_object
    var %authKey = "_NULL_"
    var %nocache $false
    var %i = 1
    while (%i <= $numtok($prop,46) ) {
      var %prop = $gettok($prop,%i,46)
      var %key = $gettok(%prop,1,40)
      var %value = $gettok($gettok(%prop,2,40),1,41)
      if (%key == nocache) { var %nocache $true }
      if (%key == auth) { var %authKey = $qt(%value) }
      inc %i
    }
    if (!$com(%handler)) {
      .comopen %handler MSScriptControl.ScriptControl
      noop $com(%handler,language,4,bstr*,VBScript)
      var %code Function getFile(file) $crlf Dim objStream, strData $crlf Set objStream = CreateObject("ADODB.Stream") $crlf objStream.CharSet = "utf-8" $crlf objStream.Open $crlf objStream.LoadFromFile(file) $crlf strData = objStream.ReadText()  $crlf $&
        getFile = strData $crlf End Function $crlf Function getURL(url,authKey) $crlf Set http = CreateObject("Microsoft.XmlHttp") $crlf http.open "GET", url, FALSE $crlf if (authUser <> "_NULL_") Then $crlf http.SetRequestHeader "Authorization", "Basic " + authKey $crlf $&
             End If $crlf http.send "" $crlf getURL=http.responseText $crlf End Function $crlf Function getValueFromXML(XML,value) $crlf $& 
        Set objXMLDoc = CreateObject("Microsoft.XMLDOM") $crlf objXMLDoc.async = False $crlf objXMLDoc.loadXML(XML) $crlf Set NodeList = objXMLDoc.selectNodes(value) $crlf For Each objNode in NodeList $crlf getValueFromXML=objNode.text $crlf $& 
        Next $crlf End Function $crlf Function getValueFromJson(json,value) $crlf Set scriptControl = CreateObject("MSScriptControl.ScriptControl") $crlf scriptControl.Language = "JScript" $crlf scriptControl.AddCode("x="& json & ";") $crlf $& 
        getValueFromJson= scriptControl.Eval( "x"& value  ) $crlf End Function $crlf Function fetchJsonLocal(File,Value) $crlf fetchJsonLocal=getValueFromJson(getFile(File),Value) $crlf End Function $crlf Function fetchJsonURL(URL,Value,authKey) $crlf $&
        fetchJsonURL=getValueFromJson(getURL(URL,authKey),Value) $crlf End Function $crlf Function fetchXMLLocal(File,Value) $crlf fetchXMLLocal=getValueFromXML(getFile(File),Value) $crlf End Function $crlf Function fetchXMLURL(URL,Value,authKey) $crlf $&
        fetchXMLURL=getValueFromXML(getURL(URL,authKey),Value) $crlf End Function       
      noop $com(%handler,addcode,1,bstr*,%code)
    }
    if (%type == json) {
      var %x = 3,%str,%p,%v
      while (%x <= $0) {
        %p = $($+($,%x),2)
        if (%p == $null) { noop }
        elseif ($chr(44) isin %p) {
          var %z = 1 
          while (%z <= $numtok(%p,44)) {
            var %n = $gettok(%p,%z,44)
            if (%n isnum || $qt($noqt(%n)) == %n) { %str = $+(%str,[,%n,]) }
            else { %str = $+(%str,[',%n,']) }
            inc %z 
          }
        }
        elseif (%p isnum || $qt($noqt(%p)) == %p) { %str = $+(%str,[,%p,]) }
        else { %str = $+(%str,[',%p,']) }

        inc %x
      }
      if ($isfile(%source)) {
        var %t $+(fetchJsonLocal,$chr(40),$qt($shortfn($replace($1,\,\\,;,\u003b))),$chr(44),$qt(%str),$chr(41)))
        if ($com(%handler,eval,1,bstr*,%t))  return $com(%handler).result 
      }
      elseif (http://* iswm $1) {
        if (%nocache) { var %url = $1 $+ $iif($chr(63) isin %source,&,?) $+ _ctime_nocache_= $+ $ctime $+ . $+ $ticks }
        else { var %url = $1 }
        var %t $+(fetchJsonURL,$chr(40),$qt($replace($qt(%url),;,\u003b)),$chr(44),$qt(%str),$chr(44),%authKey,$chr(41))) 
        if ($com(%handler,eval,1,bstr*,%t))  return $com(%handler).result
      }
      else {
        var %t $+(getValueFromJson,$chr(40),$qt($replace($1,",')),$chr(44),$qt(%str),$chr(41))
        if ($com(%handler,eval,1,bstr*,%t))  return $com(%handler).result 
      }
    }
    elseif (%type == xml) {
      var %str = $replace($3-,$chr(32),$chr(47))
      if ($isfile(%source)) {
        var %t $+(fetchXMLLocal,$chr(40),$qt($shortfn($replace($1,\,\\,;,\u003b))),$chr(44),$qt(%str),$chr(41)))
        if ($com(%handler,eval,1,bstr*,%t))  return $com(%handler).result 
      }
      elseif (http://* iswm $1) {
        if (%nocache) { var %url = $1 $+ $iif($chr(63) isin %source,&,?) $+ _ctime_nocache_= $+ $ctime $+ . $+ $ticks }
        else { var %url = $1 }
        var %t $+(fetchXMLURL,$chr(40),$qt($replace($qt(%url),;,\u003b)),$chr(44),$qt(%str),$chr(44),%authKey,$chr(41))) 

        if ($com(%handler,eval,1,bstr*,%t))  return $com(%handler).result
      }
      else {
        var %t $+(getValueFromXML,$chr(40),$qt($replace($1,",')),$chr(44),$qt(%str),$chr(41))
        if ($com(%handler,eval,1,bstr*,%t))  return $com(%handler).result 
      }
    }
  }
}

Comments

Sign in to comment.
fppe   -  Feb 03, 2017

Hi guys, need some serious help, and cookies will be given to those who help :P

So I've copied that script in my remote.ini, I've set my variables:

I've used the IP of the stream url, and the port,
I'm not sure what to use as radio.server tho?
I've set admin, and pwd

I've reloaded the script, ran the initialization commands, etc
when I save my config from the dialog box, it says successfully connected to server.

However, none of the commands work! :((
I try from a different mirc obviously, using !dj !song !url !tune etc but not getting any response..

Help!

(if you feel adventurous, the bot is running on my server irc.atrum.org and in the room #uncutmedia )

 Respond  
DarkRaven   -  Jan 31, 2016

Hi ProIcons, i have the bot working, it was very easy.
But now i have a problem, it shows me the previous song and not the current.
Can you please help me.

Regards DR

ProIcons  -  Feb 01, 2016

I'm not really sure what causes this issue. It's and old code and needs further inspection to be able to understand what's wrong. Therefore you have to wait a couple of days, because i'm on my exam period for this season.
The thing you can do to help me is to provide me your Radio Server Branch and Version. To be able to setup an identical Radio Server to test it, unless you want to send me your credentials on a private message to test it live.

DarkRaven  -  Feb 01, 2016

Wel if you like , i would let you help me by using teamviewer, so its your call.
And thnx for your quick respons, but please make first your exam because that's way much important then this script or helping me.

ProIcons  -  Feb 01, 2016

That's your Error
if ($hget(Radio,Title) != %Title && %Title) { title_callback | hadd -m Radio Title %Title }
->
if ($hget(Radio,Title) != %Title && %Title) { hadd -m Radio Title %Title | title_callback }

Line 187.

DarkRaven  -  Feb 02, 2016

Thnx ProIcons ,

That was indeed the error, its working great now.

Regards DR

Sign in to comment

DjNotNot   -  Jul 26, 2015

Why can't i find the download link?

ProIcons  -  Jul 27, 2015

There's no download link. There's a Core, that you paste it into your mIRC Remotes.

Sign in to comment

HeRiNo   -  Mar 29, 2015

Hello prolcons,
I use windows 8.1 and I run Unrel IRCD. I can't get it work after hours of trying. Do you have anu idea what might be wrong?

ProIcons  -  Mar 29, 2015

Hello. What is exactly your problem?
IRC Connectivity Issues?
Radio Server Connectivity Issues?

Please provide me your mIRC Version, your Radio Server (Icecast/Shoutcast) your Radio Server Version
And what trouble are you facing.

HeRiNo  -  Mar 29, 2015

Hello Prolcons,

the issues I have is...... I can't get the bot connected to mIRC
mIRC 2.59f <> I aslo tryed v 7.1.0.0 (same problem)
stream: 81.169.246.10 port 8002
Shoutcast2

Regards, Herman.

ProIcons  -  Mar 29, 2015

Are you still facing this issue?

HeRiNo  -  Mar 29, 2015

Yes stil the same ONLY the panel now works dorrect. But the rest still the same

ProIcons  -  Mar 29, 2015

Now if you click save on Panel what do you see?

ProIcons  -  Mar 29, 2015

Now join bot to your channel, and it will work you can see the song title by typing
//echo -a $hget(Radio,Title)

HeRiNo  -  Mar 29, 2015

That commands gives an error:

/echo: insufficient parameters

There also commands like !song !tile and so on?
I realy need to go now. Thanks a lot for you help and I hope you tomoroow have some time left to help me.

Have a good night.

ProIcons  -  Mar 30, 2015

Does your mIRC displaying any error on your Status Console?

HeRiNo  -  Apr 01, 2015

Hi,

sorry for the late responce.

I get 1 error from the bot when I reloaded it in mIRC:

Ongeldige server/script opdracht (/_radio.init)

And when I start mIRC there are some errors but they where Always there....windows 8 issue I guess.

  • /dll: unable to open file 'D:\BorgIRC' (line 22, core.mrc)
  • /_radio.init: not connected to server (line 27, script5)
  • /dll: unable to open file 'D:\BorgIRC' (line 22, core.mrc)
ProIcons  -  Apr 01, 2015

Create. New script file and paste this script there. Make sure that you dont have duplicate code and try again

Sign in to comment

ProIcons   -  Mar 22, 2015

Bot Completely Rebuilt, Now on version 3.0

salty  -  Mar 24, 2015

thank you prolcons

ProIcons  -  Mar 24, 2015

On alias object read after var %code declaration i have a debug line, write... Remove it. And i will update this page later this day, because now im logged in from Mobile Device

salty  -  Mar 24, 2015

ok thank you prolcons

Sign in to comment

salty   -  Mar 20, 2015

I can't seen to get this bot to work I use shoutcast2 with sambc and centova. i don't know how to script at all could someone help me please salty

ProIcons  -  Mar 21, 2015

Script will get Updated Please Stay tuned.

salty  -  Mar 21, 2015

thank you prolcons just let me know when it done.

ProIcons  -  Mar 22, 2015

Script Updated to Version 3.0. Please note any configuration you had on your previous version cannot apply on this version. Backward compatibility does not apply.

Sign in to comment

Drm0u   -  Aug 14, 2013

I mostly have this working for our channel and radio station. However, when the !listener trigger is executed, it sends send everything! I only expected it to send the user c.listener / m.listeners. I am using a Shoutcast v1 encoder in SAMBC. Here is an example of what a user is getting:

Listeners: 8100021234Varioushttp://myradiostation.com/dreamonDreamOn Radio Michael Jackson - Billie Jean (Dream'R Stream'R)&artist=Michael%20Jackso n&title=Billie%20Jean&album=Thriller&duration=294113&songtype=S&overlay=no&buycd=&website=&picture=3551.jpg#DreamOn-Radio.rNADream'R Stream'R11968469164audio/mpeg1.9.8 A>39611640059150182135800000007659036 D>108.249.90.203WinampMPEG/5.62, Ultravox/2.1010561462108.249.90.203WinampMPEG/5.65, Ultravox/2.1068704 6577.101.66.244WinampMPEG/5.61,Ultravox/2.1067824661376517826Michael Jackson - Billie Jean (Dream'R Stream'R)1376517816Dream On Radio - All The Right Stuff (Dream'R Stream'R)1376517292Nik Kershaw - Wouldn't it be good (Dream'R Stream'R)1376517059Shinedown - Bully (Dream'R Stream'R)1376516830Bryan Adams - Lonely Nights1376516817Dream On Radio - We'll Provide The Beats1376516517Volbeat - Fallen1376516292Foreigner - Feels Like the First Time1376516122Bay City Rollers - Saturday Night1376515899 >The Byrds - Turn Turn Turn/1000 (Dream'R Stream'R) Any ideas, what I might not have done right?
Xzempt  -  Aug 15, 2013

What software do you use for radio?

Sign in to comment

Xzempt   -  Jul 19, 2013

Does this work with Icecast 2.3.2? It seems to always return stream offline for me

ProIcons  -  Jul 19, 2013

Let me test it and i will have results for you soon. If not working code will get updated.

Xzempt  -  Jul 19, 2013

Awesome. Thanks.

Xzempt  -  Jul 20, 2013

Had any luck with it?

ProIcons  -  Jul 22, 2013

I had my birthday so i was like knocked out for 3-4 days or so. Please be patient , i will check it up as soon as i can

Sign in to comment

Nephthys   -  Jun 16, 2013

hi ty for this.
First , I have no clue in coding mIrc . lol So forgive me.
I am curious if it is possible to make this to where anyone in a certain channel can logon as a DJ just by (!onair $nick ) then have it state $nick has taken control of the DJ Booth. And if they type ( !offair ) it will log them off and state ( $nick has left the booth ) But also start a timer and end the timer at the same time. And have ( !dj show the dj $nick and amount of time onair )

Ok next lol I would like !request ( artist name - song name) open for everyone but sent to the same channel that the dj is in and a pm to that dj. to be available in other channels

And lol I know lot to ask. command !np for next song in quee to be available in other channels

Lastly :) !radio command that will display multiple links to players like : QuickTime ,Real Player, Windows Media Player , Winamp, iTunes and any others.

and a way to add fun commands.

ty for your time

ProIcons  -  Jun 16, 2013

Hello and thank you for your reply. At this moment i have no time for developing that for you. Though I Will be able to assist you in 3-4 days. Remember to PM me in 3-4 days , in order to not forget you.

Nephthys  -  Jun 20, 2013

Hello Prolcons you had askes that I reminded you in 3-4 days. :)

ProIcons  -  Jun 21, 2013

Sure give me some time. I will make it this for you

ProIcons  -  Jun 21, 2013

Some clarifications please:

You want every user of a channel to just type: !onair and automacality be the Active DJ?
And when the same person pressing !offair to get unassigned from DJ? Also what do you
want the timers to do ?

Nephthys  -  Jun 21, 2013

yes the !onair and !offair you are correct. but I need something like a stop watch or clock or timer that starts for that dj when he goes !onair and stops !offair and can display the amount of time the dj has been onair with the !dj. but would like to keep the part that if ni dj is oniar it will state no dj on air.

ProIcons  -  Jun 22, 2013

The !request will be private at bot or in main channel?

Nephthys  -  Jun 22, 2013

!request needs to have them sent to main channel so all in main channel can see, and a pm to the current DJ . would be nice if it could be turned on and off in the main channel. ( sometimes we get so many requests that another dj will have to pick them up)

ty so very much for this.

ProIcons  -  Jun 22, 2013

Please Provide me the links you want to add for each player

ProIcons  -  Jun 22, 2013

Be sure to check your private messages for the modification you Asked.

If you need help with anything please do not hasitate to ask.

Though i will be offline for a time... When i see it i will be able to assist you

Sign in to comment

ProIcons   -  Apr 02, 2013

Heads up. I Uploaded a Video file with 3 Radio Bots, on 3 Different Servers
ShoutCast 1.9.8
ShoutCast 2.0
IceCast 2.3.1.
Video is showing how each bot it interacting perfectly well with each of the following servers.
So there IS NOT a single doubt about its functionality. Please Enjoy

http://devian.gr/RadioBots.mp4

 Respond  
wickedradio   -  Mar 06, 2013

how can I modify this to pass along irc server password. the server i use for irc requires a password to connect .

ProIcons  -  Mar 06, 2013
on *:start: {
  dialog -md Panel panel
  ;; connection command (DO NOT modify this)
  if (!%bot.nick) server %irc.server %irc.port -i %bot.nick %bot.anick %bot.user %bot.name
}

->

on *:start: {
  dialog -md Panel panel
  ;; connection command (DO NOT modify this)
  if (!%bot.nick) server %irc.server %irc.port %irc.spass -i %bot.nick %bot.anick %bot.user %bot.name 
}

And you set into your variables %irc.spass with the password of your server

Example:

/set %irc.spass mypassword
wickedradio  -  Mar 06, 2013

changed this and it still doesnt connect to the irc server just times out

wickedradio  -  Mar 06, 2013

and yes i do see the %irc.spass in the variables

wickedradio  -  Mar 06, 2013

on this server the nickname has to already be set before you connect i dont know if that makes a difference with this script

ProIcons  -  Mar 06, 2013

No its not, have you changed the part of the code i provided?

wickedradio  -  Mar 06, 2013

yes i changed it but it acts like its not using that variable at all

ProIcons  -  Mar 06, 2013

Ok type this into your Status

 //echo -a server %irc.server %irc.port -i %bot.nick %bot.anick %bot.user %bot.name 

and give me the result

wickedradio  -  Mar 06, 2013

server chat.vaughn.vg 443 -i papertowel shithead href="http://bot.name" target="_blank">bot.name

wickedradio  -  Mar 06, 2013

ok i can get it to connect to the server and channel by modifying a few things but it doesnt seem to connect to the shoutcast at all and the trigger commands do not yield results to the channel only to private message which is disabled on this irc server any thoughts?

ProIcons  -  Mar 07, 2013

Have you configured correctly your Shoutcast server?

Sign in to comment

ProIcons   -  Oct 24, 2012

I will check up to it, Stay tunned.

 Respond  
JJM   -  Oct 24, 2012

It is SHOUTcast DNAS 1.9.8

 Respond  
ProIcons   -  Oct 24, 2012

please provide the full version of Shoutcast 1.x server
Example 1.9.8 , etc

Please also Provide to me if you want your Admin Information on my Inbox, or else i will setup a Shoutcast with the version you will send me in your next message

 Respond  
JJM   -  Oct 24, 2012

I use shoutcast 1. Is that what you needed?

 Respond  
ProIcons   -  Oct 24, 2012

That was a bug that i had fixed. Please tell me what Radio Server are you using? The exact version to make a stability test on this bot.

 Respond  
JJM   -  Oct 24, 2012

Prolcons I keep on getting this message : Playlist is streaming No Title Present (kbps) Everything works fine but then suddenly it will give that message and then the song name and then again that message. Any suggestions?

 Respond  
ProIcons   -  Oct 12, 2012

Find line

alias rd.title { topic %irc.chan 07,01 $+ %cfg.name $+ 15,01 Do you want fries with that? 14,01 $+ $chr(124) 07,01Current DJ14,01:15,01 $iif(%rd.status == 1, %rd.dj, None) 14,01 $+ $chr(124) 07,01Tune14,01:15,01 %cfg.site }

and replace it with

alias rd.title { ;topic %irc.chan 07,01 $+ %cfg.name $+ 15,01 Do you want fries with that? 14,01 $+ $chr(124) 07,01Current DJ14,01:15,01 $iif(%rd.status == 1, %rd.dj, None) 14,01 $+ $chr(124) 07,01Tune14,01:15,01 %cfg.site }
 Respond  
JJM   -  Oct 11, 2012

Thank you works great! How can I turn the Channel Topic change off? The channel owner has her own topic and do not want it changed. This is a definate like from me, Thank you

 Respond  
JJM   -  Oct 10, 2012

will you give the link here?

 Respond  
ProIcons   -  Oct 10, 2012

Have u seted the ADMINISTRATOR's Password and Username?
I'm Uploading a Video with Full Setup Options For IceCast 2.
ShoutCast 1.

ShoutCast 2.*

Also in this video is the bug fix i made.

 Respond  
JJM   -  Oct 10, 2012

It keeps on telling me no dj and that the stream is off. What am I doing wrong?

 Respond  
ProIcons   -  Oct 10, 2012

Official Confirmed that is not Working with IceCast 1.*

Reason Unclear Source Code:
http://icecast-server.sourcearchive.com/documentation/1:1.3.12-15/client_8c-source.html

 Respond  
ProIcons   -  Oct 10, 2012

Update.

Issue Detected with ShoutCast 2.* Servers. Fixed...

Official Tested On 3 Servers

IceCast 2.3.1
ShoutCast 1.9.8
ShoutCast 2.0

Working Fine.

JJM you can assign a DJ, by adding an AIM TAG to your streaming INFO. or else i provide for this scrip some variables that you can work with...

;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
;: %rd.status (0 for offline, 1 for online) | %rd.bitrate (bitrate)         ::
;: %rd.clisten (current listeners)          | %rd.song (current song)       ::
;: %rd.dj (current DJ, pulled from AIM tag) | %cfg.site (website url)       ::
;: %rd.plisten (peak listeners)             | %rd.genre (genre)             ::
;: %rd.mlisten (max listeners)              | %rd.type (IceCast/ShoutCast)  ::
;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

with %rd.dj you can set your dj with your own way. But be noticed you should do that on the "BDATA" alias because it is self updating in there

 Respond  
JJM   -  Oct 09, 2012

Please help, how do I assign a dj or auto dj? How do I turn it on and off(stream)?
What info is needed under Misc Info - Site
Server info - Admin user and admin pass
IRC info - IRC user and IRC name

 Respond  
ProIcons   -  May 04, 2012

Works Fine for me, let me recheck the whole code and i will inform you soon thank you for your feedback

 Respond  
TheWhistler   -  Apr 30, 2012

does not work on ShoutCast1. or ShoutCast2. or IceChat.
all the info is added in

 Respond  
ProIcons   -  Apr 28, 2012

;: %rd.dj (current DJ, pulled from AIM tag)

When you broadcast there's an "AIM" just set there the dj name

 Respond  
stolkie   -  Apr 28, 2012

it always says that there is no dj, with radionomy(shoutcast 1)

 Respond  
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.