Eggdrop icecast support patch

Scripts / Eggdrop / radio.tcl

Icecast support patch for shoutcast radio.tcl (original script written by Death Lord):

90c97
<    set query "${rurl}:${rport}/index.html"
---
>    set query "${rurl}:${rport}/"
101,102c108,109
<        if {[regexp -nocase -- {Server\ Status:\ .*?<b>(.*?)</b>} $line garb ss]} { set ss $ss }
<        if {[regexp -nocase -- {Stream\ Status:\ .*?<b>(.*?)</b>} $line garb sstatus]} {
---
>        if {[regexp -nocase -- {Server\ Status.*?(?:<b>|<td.*?>)(.*?)(?:</b>|</td>)} $line garb ss]} { set ss $ss }
>        if {[regexp -nocase -- {Stream\ Status.*?(?:<b>|<td.*?>)(.*?)(?:</b>|</td>)} $line garb sstatus]} {
106,107c113,114
<        if {[regexp -nocase -- {Listener\ Peak:\ .*?<b>(.*?)</b>} $line garb lp]} { set lp $lp }
<        if {[regexp -nocase -- {Average\ Listen\ Time:\ .*?<b>(.*?)</b>} $line garb alt]} {
---
>        if {[regexp -nocase -- {Listener\ Peak.*?(?:<b>|<td.*?>)(.*?)(?:</b>|</td>)} $line garb lp]} { set lp $lp }
>        if {[regexp -nocase -- {Average\ Listen\ Time.*?(?:<b>|<td.*?>)(.*?)(?:</b>|</td>)} $line garb alt]} {
111,117c118,124
<        if {[regexp -nocase -- {Stream\ Title:\ .*?<b>(.*?)</b>} $line garb stitle]} { set stitle $stitle }
<        if {[regexp -nocase -- {Content\ Type:\ .*?<b>(.*?)</b>} $line garb ctype]} { set ctype $ctype }
<        if {[regexp -nocase -- {Stream\ Genre:\ .*?<b>(.*?)</b>} $line garb sgenre]} { set sgenre $sgenre }
<        if {[regexp -nocase -- {Stream\ URL:\ .*?<b><.*?>(.*?)</a>} $line garb surl]} { set surl $surl }
<        if {[regexp -nocase -- {Stream\ AIM:\ .*?<b><.*?>(.*?)</a>} $line garb saim]} { set saim $saim }
<        if {[regexp -nocase -- {Current\ Song:\ .*?<b>(.*?)</b>} $line garb song]} { set song $song }
<        if {[regexp -nocase -- {Stream\ IRC:\ .*?<a\ .*?>(.*?)</a>} $line garb sirc]} { set sirc $sirc }
---
>        if {[regexp -nocase -- {Stream\ Title.*?(?:<b>|<td.*?>)(.*?)(?:</b>|</td>)} $line garb stitle]} { set stitle $stitle }
>        if {[regexp -nocase -- {Content\ Type.*?(?:<b>|<td.*?>)(.*?)(?:</b>|</td>)} $line garb ctype]} { set ctype $ctype }
>        if {[regexp -nocase -- {Stream\ Genre.*?(?:<b>|<td.*?>)(.*?)(?:</b>|</td>)} $line garb sgenre]} { set sgenre $sgenre }
>        if {[regexp -nocase -- {Stream\ URL.*?(?:<b>|<td.*?>)<.*?>(.*?)</a>} $line garb surl]} { set surl $surl }
>        if {[regexp -nocase -- {Stream\ AIM.*?(?:<b>|<td.*?>)<.*?>(.*?)</a>} $line garb saim]} { set saim $saim }
>        if {[regexp -nocase -- {Current\ Song.*?(?:<b>|<td.*?>)(.*?)(?:</b>|</td>)} $line garb song]} { set song $song }
>        if {[regexp -nocase -- {Stream\ IRC.*?<a\ .*?>(.*?)</a>} $line garb sirc]} { set sirc $sirc }

Tags:

Last Modified: 2012-03-06 00:41:07 by BrainFucker - [ Snip Changes ] [ Wiki History ]