Unfortunately I don't have a last.fm account, and I don't want to bother making one, so I can't use this script for my personal use. :<
But as for the script, you can certainly change some things (they're very minor).
Instead of
set %last.fm.active $active
, you can use
sockmark lastfm $active
, so
describe %last.fm.active np: ( )( %last.fm.song by %last.fm.artist )( )
can be
describe $sock(lastfm).mark np: ( )( %last.fm.song by %last.fm.artist )( )
What's very useful about sockmark is that you can limit your usage on variables. /tokenize works very well with it too, if you have multiple items you want to sockmark. With sockmarking, you can jam bits of information for useful purposes.
The
halt
in the $sockerr is unecessary because you have an else { after it, and the
var %sockreader
is unecessary as well because I do not see other place in which it is used.
Good to see some regex too.
Other than that, very nice work tv3636.