Ability to modify custom variables from private message

Post Reply
Author
Message
nat1968
Offline
Junior Member
Posts: 6
Joined: Sun Oct 13, 2013 2:38 pm

Ability to modify custom variables from private message

Post by nat1968 »

What i'd like to be able to do is:

Create a custom variable in ircbot.text, i.e. %showtitle=[initial text value]
then be able to have users modify the value with some command.

like: !mod %showtitle A new text string to display

[!mod %showtitle reset] could reset the variable back to the initial value.

Then we could use this text variable in some channel messages.


OK, backstory for those that care.

We just upgraded our radio station to SHOUTcast DNAS 2.0. using autoDJ from CentovaCast. The problem is V1 would allow us to add the current DJ name into the AIM box on our encoder and pas it along in it's metadata. Then shoutIRC would just grab it there for the current DJ. They removed that capability from V2. Trust me, I've looked for a work around and nothing exists. Now in shoutIRC it never changes.

The stream title or DJ Name no longer changes when new DJ's connect, it's the master station title. I want to have something like "Maniac Monday's with DJ^Freddy is playing Beck - Hotwax" display on song changes.

So if we could do this, then when a dj got on air, he could /msg the bot and change the show title. Then reset it when he was done. Also, if he/she forgot to do it, then any existing user can reset it back.


Indy
User avatar
Offline
Site Admin
Posts: 465
Joined: Thu Oct 16, 2008 1:58 pm
IRCBot Version I Use: v5
IRCBot Platform: Linux/Ubuntu
Contact:

Re: Ability to modify custom variables from private message

Post by Indy »

Most people just set that in the station name in the encoder, unless you have it set to a fixed string in sc_serv.conf that overrides what the DJ sets. I don't know why it would get set in the AIM box???

ie. if you want it to say "Maniac Monday's with DJ^Freddy" set the station name to that in SAM/SHOUTcast DSP/etc.
You can also contact me via email or instant messenger, links are at the bottom of this post.

nat1968
Offline
Junior Member
Posts: 6
Joined: Sun Oct 13, 2013 2:38 pm

Re: Ability to modify custom variables from private message

Post by nat1968 »

This is the problem, we could do that when running against a SC_V1 server by just changing the Station Name on the encoder config. SC_V2 servers don't allow that anymore.

There are several differences when it comes to broadcasting between ShoutCast 1 and ShoutCast 2. With ShoutCast 1 there were 2 broadcasting modes - live and AutoDJ. If you didn't want to use AutoDJ at all you could just broadcast live and if you wanted to use AutoDJ you would have to disable it when you wanted to broadcast live and then re-enable it when you stopped
broadcasting live.

With ShoutCast 2 you can have AutoDJ enabled and if you start broadcasting it will automatically turn off AutoDJ while you are broadcasting live and once you stop broadcasting AutoDJ will automatically start again. If you don't want to use AutoDJ at all you can just broadcast as you would in ShoutCast 1, while you are broadcasting live that stream can be heard on your station
and when you're not broadcasting there is nothing to be heard.

Because of these additions there are now 3 ports in ShoutCast 2 compared to the one port in ShoutCast 1, what displays on the station DNAS page is the Station Name from the main port, NOT what is coming in from your encoder. Unless you modify the song title, which i'd really not care to do.

Does this make sense?

Indy
User avatar
Offline
Site Admin
Posts: 465
Joined: Thu Oct 16, 2008 1:58 pm
IRCBot Version I Use: v5
IRCBot Platform: Linux/Ubuntu
Contact:

Re: Ability to modify custom variables from private message

Post by Indy »

Yep, that's actually a Centova issue; not ShoutCast. ShoutCast works the same as before except it can handle more than one stream at a time (and a different source protocol). Assumedly Centova is using one SID (Stream ID) for AutoDJ, and another for Live DJs.

That said, if you add the Live DJ one to the bot as SS/Server0, and the AutoDJ one as SS/Server1 then it will pick up your intended stream name.
You'll probably also have to set PullNameFromAnyServer to 1 in the Base section.
You can also contact me via email or instant messenger, links are at the bottom of this post.

nat1968
Offline
Junior Member
Posts: 6
Joined: Sun Oct 13, 2013 2:38 pm

Re: Ability to modify custom variables from private message

Post by nat1968 »

ok, I will agree that it is a Centova AutoDJ issue. But I don't think adding an additional SS/Server entry resolves it. There is nothing for shoutIRC to connect to at that port. I'm sure shoutIRC currently is getting the metadata for the main stream from the parsing the html or using the api. There isn't anything to get on the other ports other than the main one.

i.e.:
http://listen.radiopoverty.com:3236/index.html?sid=1 is our public link.
listen.radiopoverty.com:3238 is the url/port we stream our local encoders to.

and I'm currently encoding locally.

BTW, I tried what you said and all I got was SS Scraper -> Got garbage from server [0]

Indy
User avatar
Offline
Site Admin
Posts: 465
Joined: Thu Oct 16, 2008 1:58 pm
IRCBot Version I Use: v5
IRCBot Platform: Linux/Ubuntu
Contact:

Re: Ability to modify custom variables from private message

Post by Indy »

I guess 3238 is Centova and not another shoutcast/icecast? I guess they just stop their AutoDJ and pass throughy our audio when they get a source on that port.
You can also contact me via email or instant messenger, links are at the bottom of this post.

aceOverKings
Offline
Junior Member
Posts: 14
Joined: Thu Oct 31, 2013 3:52 pm

Re: Ability to modify custom variables from private message

Post by aceOverKings »

That is what I'm thinking as well.... looking at the Shoutcast and Centova API's there doesn't seem to be a way to extract the currently encoding stream station name or anything else for that matter. The artist-song gets passed through to the autoDJ server.

aceOverKings
Offline
Junior Member
Posts: 14
Joined: Thu Oct 31, 2013 3:52 pm

Re: Ability to modify custom variables from private message

Post by aceOverKings »

Great Plugin Indy..............

Thanks a million!

aces

Post Reply