tglogo.png

Downloading File

Filename: Music Search Script
;TinySong Script by Ford_Lawnmower irc.mindforge.org #USA-Chat
#TinySongTrigger Off
On $*:Text:/(^[!@])music +/Si:#: {
  if ($regml(1) == @) && ($nick isop $chan) {
    tinysong .msg $chan $replace($2-,$chr(32),+)
  }
  else {
    if (!$timer(music $+ $nick)) {
      .timer $+ $+(music,$nick) 1 10 noop
      tinysong .notice $nick $replace($2-,$chr(32),+)
    }
  }
}
#TinySongTrigger End
alias -l tinysong {
  sockclose $+(tinysong,$2)
  sockopen $+(tinysong,$2) tinysong.com 80
  sockmark $+(tinysong,$2) $1-
}
on *:sockopen:tinysong*: {
  sockwrite -n $sockname GET $+(/s/,$gettok($sock($sockname).mark,3,32),?limit=3) HTTP/1.1
  sockwrite -n $sockname Host: tinysong.com $+ $CRLF $+ $CRLF
}
on *:sockread:tinysong*: {
  if ($sockerr > 0) { echo -at socket error tinysong -->> $sockerr }
  else {
    var %tinysongvar | sockread %tinysongvar
    if (%tinysongvar == Content-Length: 4) {
      $gettok($sock($sockname).mark,1,32) $gettok($sock($sockname).mark,2,32) Song not Found.
    }
    else {
      if ( http:// isin %tinysongvar) {
        tokenize 59 %tinysongvar 
        $gettok($sock($sockname).mark,1,32) $gettok($sock($sockname).mark,2,32) Song =  $3 by $5 from the album $7 $+(,,$1)
      }
    }
  }
}
menu Channel,Status {
  TinySong
  .$iif($group(#TinySongTrigger) == On,$style(1)) TinySong Trigger
  ..$iif($group(#TinySongTrigger) == On,$style(2)) On: .enable #TinySongTrigger
  ..$iif($group(#TinySongTrigger) == Off,$style(2)) Off: .disable #TinySongTrigger
} 

Related Files

by Tribe
by ^Neptune

Please note that on our website we use cookies necessary for the functioning of our website, cookies that optimize the performance. To learn more about our cookies, how we use them and their benefits, please read our Cookie Policy.
I Understand