shoutcast
Posted by w.e
Tuesday, March 29, 2005
Description: live 365 only by wnr|reg for wetnoseradio

on *:join:#wetnoseradio: {
  set %nicka $nick
  song3 $nick
}
on *:text:@song:#wetnoseradio: {
  song2
  song
}
on *:text:@commands:#wetnoseradio: {
  msg $chan [^K]0,4»» [^K]0,4#[^K]1Wetnoseradio [^K]0,4«« [^K]0,4»» [^K]0C[^K]1ommands: [^K]1@[^K]0song [^K]1@[^K]0request [^K]1@[^K]0dj [^K]1@[^K]0shoutout [^K]1@[^K]0server [^K]0,4««
}
on *:text:@request*:#wetnoseradio: {
  notice %dj shoutout: $2-
}
on *:text:@shoutout*:#wetnoseradio: {
  notice %dj shoutout: $2-
}
on *:text:@server*:#wetnoseradio: {
  msg $chan [^K]0,4»» [^K]0,4#[^K]1Wetnoseradio [^K]0,4«« [^K]0,4»» [^K]0C[^K]1ommands:[^K]0 Live 365: http://www.live365.com/cgi-bin/mini.cgi?stream=1311739&genre=&tm=1112079764030 [^K]1[^B][^B]64[^K]0 kbps: http://listen.gotimsworld.com/listen.pls [^K]0,4««
}
alias $dj {
  return %dj
}
on *:text:@dj:#wetnoseradio: {
  msg $chan [^K]0,4»» [^K]0,4#[^K]1Wetnoseradio [^K]0,4«« [^K]0,4»» [^K]0D[^K]1J: [^K]1L[^K]0ive 365: [^K]0 $+ %dj [^K]1[^B][^B]64 ««
}
on *:text:@onair:#wetnoseradio: {
  if (%dj == offline) {
    msg $chan [^K]0,4»» [^K]0,4#[^K]1Wetnoseradio [^K]0,4«« [^K]0,4»» [^K]0D[^K]1J: [^K]0 $+ $nick ««
    set %dj $nick
  }
  else {
    notice $nick somethings wrong :D
  }
}
on *:text:@offair:#wetnoseradio: {
  if (%dj == $nick) {
    msg $chan [^K]0,4»» [^K]0,4#[^K]1Wetnoseradio [^K]0,4«« [^K]0,4»» [^K]0D[^K]1J: [^K]0 %dj ««
    set %dj offline
  }
  else {
    notice $nick somethings wrong :D
  }
}
alias song {
  unset %artist*
  unset %title*
  sockclose song
  sockopen song live365.com 80
}
on *:SOCKOPEN:song:{
  sockwrite -n $sockname GET /pls/front?handle=wetnoseradio&handler=playlist&cmd=view&site=live365 HTTP/1.1
  sockwrite -n $sockname Host: live365.com
  sockwrite -n $sockname Connection: keep-alive
  sockwrite -n $sockname User-Agent: Mozilla/3.0 (compatible)
  sockwrite -n $sockname Authorization: Basic <uu-encoded>
  sockwrite -n $sockname $crlf
}
on *:sockread:song:{
  :nextread
  sockread -f %scasttemp
  if ($sockbr == 0) return
  if (%scasttemp == $null) %scasttemp = empty
  set %scasttemp $remove(%scasttemp,<HTML><meta http-equiv="Pragma" content="no-cache"></head><body>,</body></html>,<title>,</title>,        )
  if (artist isin %scasttemp) {
    if (%artist == 1) { halt }
    else {
      set %artist 1
      msg #wetnoseradio [^K]0,4»» [^K]0,4#[^K]1Wetnoseradio [^K]0,4«« [^K]0,4»» [^K]0L[^K]1ive 365: [^K]0 $+ $remove(%scasttemp,artist:,",$chr(44)) - %titlee [^K]0,4««
    }
  }
  if (title isin %scasttemp) {  
    if (%title == 1) { halt }
    else {
      set %title 1
      set %titlee $remove(%scasttemp,$chr(44),",title:)
    }
  }
  goto nextread
}
alias song2 {
  sockclose song2
  sockopen song2 67.80.186.105 27016
}
on *:SOCKOPEN:song2:{
  sockwrite -n $sockname GET /7.html HTTP/1.0
  sockwrite -n $sockname User-Agent: Mozilla
  sockwrite -n $sockname $crlf
}
on *:sockread:song2:{
  if ($sockerr > 0) return
  :nextread
  sockread -f %scasttemp
  if ($sockbr == 0) return
  if (%scasttemp == $null) %scasttemp = empty
  set %scasttemp $remove(%scasttemp,<HTML><meta http-equiv="Pragma" content="no-cache"></head><body>,</body></html> )
  if ((HTTP/1.* !iswm %scasttemp) && (content-type* !iswm %scasttemp) && (%scasttemp != empty)) {
    set %56k $gettok(%scasttemp,7-,44)
  }
  goto nextread
}
on *:notice:#wetnoseradio: {
  cs tb $chan $nick 800
}
Submit a comment
Oops! You need to login or register before you can post a comment!

ebaum's world