Shanker09 commented on a Page, Last.FM - Latest Songs  -  Jan 09, 2010

It's alright but, In all you don't need a "|" in it because it' takes longer for mIRC to process

So...

alias lastfm-connection { 
sockopen lastfm audioscrobbler.com 80 }
on *:SOCKOPEN:lastfm:{

  ; connection
  sockwrite -n $sockname GET %lastfm-c HTTP/1.1

  ; Write Connection Details
  sockwrite -n $sockname Host: ws.audioscrobbler.com
  sockwrite -n $sockname $crlf 

}
on *:SOCKREAD:lastfm:{
  sockread %mirc.temp
  if ((%lastfm-x != $iif(%lastfm-maxposts == $null,6,$calc(%lastfm-maxposts + 1))) && (<docs> !isin %mirc.temp)) {
    if (%lastfm-x == $iif(%lastfm-maxposts == $null,5,%lastfm-maxposts)) { msg %lastfm-chan RSS-Feeds for %lastfm-user $+ : http://ws.audioscrobbler.com/1.0/user/ $+ %lastfm-user $+ /recenttracks.rss 
 inc %lastfm-x
 }
    if (<title> isin %mirc.temp) {
      msg %lastfm-chan $remove(%mirc.temp,<title>,</title>)
      inc %lastfm-x
    }
  }
}

on *:SOCKCLOSE:lastfm:{ unset %lastfm-* }
on *:TEXT:!lastfm*:#:{
  if (!$2) { msg $chan 00,04LastFM: !lastfm <username> <posts> 
 halt
 }
  sockclose lastfm
  set %lastfm-maxposts $3
  set %lastfm-user $2
  msg $chan 00,04LastFM: Latest  $iif(%lastfm-maxposts == $null,5,%lastfm-maxposts)  Songs by $2
  set %lastfm-chan $chan
  var %i 1
  set %lastfm-c /1.0/user/ $+ $2 $+ /recenttracks.rss
  lastfm-connection 
}

& Also Works with no errors so Nice :)

•»04:57:38:am«• <&DDoS> !lastfm
•»04:57:38:am«• <~shanker> LastFM: !lastfm <username> <posts>
•»04:57:43:am«• <&DDoS> !lastfm lol @You
•»04:57:43:am«• <~shanker> LastFM: Latest  @You  Songs by lol
•»04:57:44:am«• <~shanker> John Williams – The Droids Are Captured
•»04:57:44:am«• <~shanker> D12 – My Band
•»04:57:44:am«• <~shanker> Akira Yamaoka – Theme of Laura (acoustic)
•»04:57:44:am«• <~shanker> Akira Yamaoka – locked
•»04:57:44:am«• <~shanker> Marilyn Manson – The Death Song
•»04:57:44:am«• <~shanker> John Williams – Luke's Nocturnal Visitor
•»04:57:44:am«• <~shanker> Akira Yamaoka – White Noiz
•»04:57:44:am«• <~shanker> Vangelis – Come to Me
•»04:57:44:am«• <~shanker> John Williams – Brother and Sister, Father and Son, The Fleet Enters Hyperspace, Heroic Ewok
•»04:57:44:am«• <~shanker> Eminem – Lose Yourself
 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.