https://script.quakenet.org/wiki/index.php?title=Shoutcast_status_script&feed=atom&action=history
Shoutcast status script - Revision history
2024-03-29T10:30:40Z
Revision history for this page on the wiki
MediaWiki 1.27.2
https://script.quakenet.org/wiki/index.php?title=Shoutcast_status_script&diff=3893&oldid=prev
Albie at 19:33, 27 November 2005
2005-11-27T19:33:21Z
<p></p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;' lang='en'>
<td colspan='2' style="background-color: white; color:black; text-align: center;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black; text-align: center;">Revision as of 19:33, 27 November 2005</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l38" >Line 38:</td>
<td colspan="2" class="diff-lineno">Line 38:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>   ; Check whether we've found the right line in the response</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>   ; Check whether we've found the right line in the response</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>   ; The line should be like <html><body>information about the stream</body></html></div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>   ; The line should be like <html><body>information about the stream</body></html></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>   [[If-<del class="diffchange diffchange-inline">then</del>-<del class="diffchange diffchange-inline">else</del>|if]] (<body> [[isin]] %a) {</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>   [[If-<ins class="diffchange diffchange-inline">Then</ins>-<ins class="diffchange diffchange-inline">Else</ins>|if]] (<body> [[isin]] %a) {</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>     ; Extract the information from %a</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>     ; Extract the information from %a</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>     ; .echo -q will tell mirc not to show the result of $regex</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>     ; .echo -q will tell mirc not to show the result of $regex</div></td></tr>
</table>
Albie
https://script.quakenet.org/wiki/index.php?title=Shoutcast_status_script&diff=1091&oldid=prev
BlackShroud: this really isn't a tutorial.. moved to script archive
2005-09-03T06:52:14Z
<p>this really isn't a tutorial.. moved to script archive</p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;' lang='en'>
<td colspan='2' style="background-color: white; color:black; text-align: center;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black; text-align: center;">Revision as of 06:52, 3 September 2005</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l47" >Line 47:</td>
<td colspan="2" class="diff-lineno">Line 47:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>   }</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>   }</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>  }</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>  }</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>[[Category:<del class="diffchange diffchange-inline">Tutorials</del>]]</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>[[Category:<ins class="diffchange diffchange-inline">Script Archive</ins>]]</div></td></tr>
</table>
BlackShroud
https://script.quakenet.org/wiki/index.php?title=Shoutcast_status_script&diff=377&oldid=prev
BlackShroud at 17:34, 2 September 2005
2005-09-02T17:34:40Z
<p></p>
<p><b>New page</b></p><div>Do you have an aspiring web-radio? You can use this script to tell your listeners what song they're currently listening to and how many other users are enjoying your show.<br />
<br />
; Using this on TEXT event we can react to users who<br />
; write !status in your channel. Do not forget to replace #your-channel<br />
; with your actual channel<br />
on *:[[on_text|text]]:!status:#your-channel:{<br />
; We store the channel's name in a variable so we know where to send<br />
; the replies to.<br />
[[set]] %radiochan $chan<br />
<br />
; Open a connection to the radio's web-server.<br />
; Replace 'your-radio.example.org' with your radio's host<br />
; and 8000 with its actual port.<br />
[[sockopen]] getsong your-radio.example.org 8000<br />
}<br />
<br />
; The webserver has accepted our connection attempt.<br />
on *:[[on_sockopen|SOCKOPEN]]:getsong: {<br />
; We will now send a simple HTTP request to collect statistics about the radio.<br />
[[sockwrite]] -n [[$sockname]] GET /7 HTTP/1.0<br />
sockwrite -n $sockname User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a2) Gecko<br />
sockwrite -n $sockname<br />
}<br />
<br />
; This gets triggered when the webserver replies to our HTTP request.<br />
on *:[[on_sockread|SOCKREAD]]:getsong: {<br />
; Read a single line from the response and store it in %sctext<br />
[[sockread]] %sctext<br />
<br />
; While there's still remaining data in the response...<br />
[[while]] ([[$sockbr]]) {<br />
; ... read it ...<br />
sockread -f %sctext<br />
; and append it to %a<br />
[[var]] %a = %a %sctext<br />
}<br />
<br />
; Check whether we've found the right line in the response<br />
; The line should be like <html><body>information about the stream</body></html><br />
[[If-then-else|if]] (<body> [[isin]] %a) {<br />
; Extract the information from %a<br />
; .echo -q will tell mirc not to show the result of $regex<br />
.[[echo]] -q [[$regex]](%a, /<body>(.*)</body>/)<br />
<br />
; Use /msg to tell the users about the stream's status.<br />
if (%radiochan) { [[msg]] %radiochan [[$regml]](1) }<br />
}<br />
}<br />
[[Category:Tutorials]]</div>
BlackShroud