I ended up making a perl script that retrieved info from a php API we made to show some info about a given stream using the different APIs of the different stream providers so my irc script only had to deal with one method of data retrieval.
it's a rather crude operation so id rather not share as it is not scalable, output is defined on a elseif basis
I do hope someone will pick up the idea and make something, i know there are purchasable versions of this on the net but this should really be here somehow
Short version:
Code: Select all
if ( $count le 3 ) { # Finds streams from a series of files
for ($i = 0; $i <= $#filnvn; $i++) { #traverses streamfiles
open(FD, "<$filnvn[$i]") || die ("$0: $!"); #opens files
while(<FD>) { #while loop
if ($_ !~ m/-1/) { #checks viewer number, if -1 its offline.
$view=$_; #sets viewer number
if ($urls[$i] =~ m/streamname/) { #if it matches this stream, output link to stream
print "<<Streamname>> www.justin.tv/streamname ($view Viewers) "; $count=1; #found valid stream, exits
}
}
}
}
}
I did it like this because it was simple and i didn't have to display that many streams, id love to do it again but i dont have time.