Advertisement
Wikked

IceCast 2.4.3

Mar 18th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 8.35 KB | None | 0 0
  1. ON *:text:*:%icecast_chan: {
  2.   if (!radio == $1) {
  3.     .timer_radio_msg_ $+ $network $+ _ $+ $nick 1 1 radio_msg
  4.   }
  5.   elseif ($1 == !url) {
  6.     .timer_radio_url_ $+ $network $+ _ $+ $nick 1 1 radio_url $nick
  7.   }
  8.   elseif ($1 == !radiohelp) {
  9.     .timer_radio_help_ $+ $network $+ _ $+ $nick 1 1 radio_help $nick
  10.   }
  11.   elseif ($1 == !song) {
  12.     .timer_radio_song_ $+ $network $+ _ $+ $nick 1 1 msg %icecast_chan  $+ $colm Current Song:  $+ $cols %z.artist - %z.title  $+ $cold $chr(8226)  $+ $colm Genre:  $+ $cols %z.genre
  13.   }
  14.   elseif ($1 == !listeners) {
  15.     .timer_radio_listeners_ $+ $network $+ _ $+ $nick 1 1 msg %icecast_chan  $+ $colm Listeners:  $+ $cols %z.listeners  $+ $colm (Peak:  $+ $cols %z.listenerpeak  $+ $colm $+ )
  16.   }
  17.   elseif ($1 == !total) {
  18.     .timer_radio_total_ $+ $network $+ _ $+ $nick 1 1 msg %icecast_chan  $+ $colm Total %icecast_chan Joins:  $+ $cols %total_chan_joins  $+ $colm (Since:  $+ $cols %total_chan_joins_date  $+ $colm $+ )
  19.   }
  20. }
  21.  
  22. alias -l radio_url {
  23.   msg %icecast_chan  $+ $colm Listen  $+ $cold $+ @ $+ $cols http:// $+ %z.host
  24.   ;msg %icecast_chan  $+ $colm Listen  $+ $cold $+ @ $+ $cols http:// $+ %z.host $+ : $+ $my_icecast_port
  25.   ;msg %icecast_chan  $+ $colm Listen  $+ $cold $+ @ $+ $cols  http:// $+ $my_icecast_url $+ : $+ $my_icecast_port
  26. }
  27.  
  28. alias -l radio_help {
  29.   msg %icecast_chan  $+ $colm $+ ( $+ $cols Radio Help  $+ $colm $+ )
  30.   msg %icecast_chan 
  31.   msg %icecast_chan  $+ $cols !Request <song>  $+ $cold $chr(8226)  $+ $colm To request a song.
  32.   msg %icecast_chan  $+ $cols !Radio  $+ $cold $chr(8226)  $+ $colm To see Radio Info.
  33.   msg %icecast_chan  $+ $cols !Url  $+ $cold $chr(8226)  $+ $colm To display the Radio stream url.
  34.   msg %icecast_chan  $+ $cols !Song  $+ $cold $chr(8226)  $+ $colm To display current playing song.  
  35.   msg %icecast_chan  $+ $cols !Listeners  $+ $cold $chr(8226)  $+ $colm To display current listeners.
  36.   msg %icecast_chan  $+ $cols !Total  $+ $cold $chr(8226)  $+ $colm To display total %icecast_chan joins.
  37. }
  38.  
  39. alias -l radio_msg {
  40.   msg %icecast_chan  $+ $cols %z.servername  $+ $cold $chr(8226)  $+ $colm Now Playing:  $+ $cols %z.artist - %z.title  $+ $cold $chr(8226)  $+ $colm Genre:  $+ $cols %z.genre  $+ $cold $chr(8226)  $+ $colm BitRate:  $+ $cols %z.ice-bitrate  $+ $cold $chr(8226)  $+ $colm Channels:  $+ $cols %z.ice-channels  $+ $cold $chr(8226)  $+ $colm SampleRate:  $+ $cols %z.ice-samplerate  $+ $cold $chr(8226)  $+ $colm Listeners:  $+ $cols %z.listeners  $+ $colm (Peak:  $+ $cols %z.listenerpeak  $+ $colm $+ )
  41. }
  42.  
  43. ON *:JOIN:%icecast_chan: {
  44.   if ($nick != $me) { inc %total_chan_joins 1 | return }
  45.   if ($nick == $me) {
  46.     .timeer 1  20 chan_url_spam_msg
  47.     unset %no_spam
  48.   }
  49. }
  50.  
  51. ON *:PART:%icecast_chan: { if ($nick == $me) { set %no_spam 1 } }
  52. ON *:KICK:%icecast_chan: { if ($knick == $me) { set %no_spam 1 } }
  53.  
  54. alias colm { return $iif(%radio_color1,$v1,3) }
  55. alias cols { return $iif(%radio_color2,$v1,33) }
  56. alias cold { return $iif(%radio_color3,$v1,79) }
  57.  
  58.  
  59. ON *:SOCKOPEN:radio_*: {
  60.   if ($sockerr) { scon -a msg %icecast_admin_chan 4Error Sock OPEN $qt($sockname) | return }
  61.   sockwrite -nt $sockname GET /status-json.xsl HTTP/1.1
  62.   sockwrite -nt $sockname Host: $my_icecast_url
  63.   sockwrite -nt $sockname Connection: Close
  64.   sockwrite $sockname $crlf
  65. }
  66.  
  67. ON *:SOCKREAD:radio_*: {
  68.   if ($sockerr) { scon -a msg %icecast_admin_chan 4Error Sock READ $qt($sockname) | return }
  69.   var %radio | sockread %radio
  70. }
  71.  
  72. ON *:SOCKCLOSE:radio_*: {
  73.   if ($sockerr) { scon -a msg %icecast_admin_chan 4Error Sock CLOSE $qt($sockname) | return }
  74.   var %radio | sockread -f %radio
  75.   var %x = 1
  76.   while (%x <= $numtok(%radio,34)) {
  77.     var %g = $gettok(%radio,%x,34)
  78.     if (%g != :) && (%g != ,) && (%g != dummy) && (*null* !iswm  %g) && (%g != :{) && (%g != $chr(123)) {
  79.       if (*"source":{* iswm %radio) {
  80.         if (%radiostatus == 2) {
  81.           set %radiostatus 1
  82.           scon -a topic %icecast_chan %z.online.topic
  83.         }
  84.       }
  85.       if (*"source":{* !iswm %radio) {
  86.         if (%radiostatus == 1) {
  87.           set %radiostatus 2
  88.           scon -a topic %icecast_chan %z.offline.topic
  89.           sockclose $sockname
  90.           break
  91.         }
  92.       }
  93.       var %h = $gettok(%radio,$calc(%x + 1),34)
  94.       var %hh = $gettok(%radio,$calc(%x + 2),34)
  95.       var %i = $remove(%h,:,$chr(44))
  96.       var %ii = $remove(%hh,:,$chr(44))
  97.       var %j = $replace(%i,chr(32),$chr(32)),audio_bitrate,$chr(32))
  98.       var %jj = $replace(%ii,chr(32),$chr(32),audio_bitrate,$chr(32))
  99.       if (%g == host) { set %z.host %jj }
  100.       if (%g == server_name) { set %z.servername %jj }
  101.       if (%g == artist) { set %z.artist %jj }
  102.       if (%g == genre) { set %z.genre %jj }
  103.       if (%g == ice-bitrate) { set %z.ice-bitrate %j }
  104.       if (%g == audio_channels) { set %z.ice-channels %j }
  105.       if (%g == audio_samplerate) { set %z.ice-samplerate %j }
  106.       ;if (%g == listenurl) { set %z.listenurl %jj }
  107.       if (%g == listener_peak) { set %z.listenerpeak %j }
  108.       if (%g == listeners) { set %z.listeners %j }
  109.       if (%g == title) { z.spam | set %z.oldsong %z.title  | set %z.title %jj }
  110.     }
  111.     inc %x
  112.   }
  113. }
  114.  
  115. ;.timer_radio.online_checkerz 1 4 set %z.radio.online 1 | .timer 1 8 z.topic
  116.  
  117. alias z.topic {
  118.   if (%z.radio.online) {
  119.     topic %icecast_chan %z.offline.topic
  120.     unset %z.radio.online
  121.     return
  122.   }
  123.   if (!%z.radio.online) {
  124.     topic %icecast_chan %z.online.topic
  125.   }
  126. }
  127.  
  128.  
  129. alias z.spam {
  130.   if (%no_spam) { return }
  131.   if (%z.oldsong == %z.title) { return }
  132.   scon -a msg %icecast_chan  $+ $cols %z.servername  $+ $cold $chr(8226)  $+ $colm Now Playing:  $+ $cols %z.artist - %z.title  $+ $cold $chr(8226)  $+ $colm Genre:  $+ $cols %z.genre  $+ $cold $chr(8226)  $+ $colm BitRate:  $+ $cols %z.ice-bitrate  $+ $cold $chr(8226)  $+ $colm Channels:  $+ $cols %z.ice-channels  $+ $cold $chr(8226)  $+ $colm SampleRate:  $+ $cols %z.ice-samplerate  $+ $cold $chr(8226)  $+ $colm Listeners:  $+ $cols %z.listeners  $+ $colm (Peak:  $+ $cols %z.listenerpeak  $+ $colm $+ )
  133. }
  134.  
  135. alias radio {
  136.   sockopen radio_ $+ $(1,99999999) $my_icecast_url $my_icecast_port
  137. }
  138.  
  139. alias my_icecast_url {
  140.   ;######################################################################################
  141.   ;# Input your server's URL below (don't erase "return") >> DON'T INCLUDE THE :PORT << #
  142.   ;######################################################################################
  143.   return 64.140.169.30
  144.   ;#############################
  145. }
  146.  
  147. alias my_icecast_port {
  148.   ;################################################################################
  149.   ;# Input  below the port that the server is listening to (don't erase "return") #
  150.   ;################################################################################
  151.   return 80
  152.   ;################
  153. }
  154.  
  155. on *:connect:{
  156.   ;##############################################################################
  157.   ;# Input your the channel(s) you want the messages to be sent in below.       #
  158.   ;# Input how frequent you want the script to check for a new song (e.g 30)    #
  159.   ;##############################################################################
  160.   set %icecast_chan #IRC-Radio
  161.   set %icecst_spam 3
  162.   set %z.online.topic  $+ $colm IRC-Radio  9Online  $+ $cold $chr(8226)  $+ $cols DJ:  $+ $cold %icecast_dj  $+ $cold $chr(8226)  $+ $cols !RadioHelp  $+ $cold $chr(8226) http:// $+ %z.host  $+ $cold $chr(8226)  $+ $cols Come listen to tunes, hangout and have a awesome chat experience!
  163.   set %z.offline.topic  $+ $colm IRC-Radio  4Offline  $+ $cold $chr(8226)  $+ $cols !RadioHelp  $+ $cold $chr(8226) http:// $+ %z.host  $+ $cold $chr(8226)  $+ $cols Come listen to tunes, hangout and have a awesome chat experience!
  164.   ;##################################################################################################
  165.   .timerice_check 0 %icecst_spam radio
  166.   set %total_listeners_date 21/03/2018
  167.   .timer_chan_url_spam 0 21600 chan_url_spam_msg
  168. }
  169.  
  170. on *:disconnect:{
  171.   .timerice_check off
  172.   .timer_chan_url_spam off
  173. }
  174.  
  175. alias chan_url_spam_msg {
  176.   if (%no_spam) { return }
  177.   scon -a msg %icecast_chan  $+ $colm We would like to Thank & Welcome you to  $+ $cols %icecast_chan  $+ $colm for joining us!  $+ $cold $chr(8226)  $+ $colm Listen  $+ $cold @  $+ $cols http:// $+ %z.host
  178. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement