use Xmms::Remote ();

IRC::register ("XMMS-node", "1.0", "", "");

IRC::add_command_handler("xmms", "xmms_handler");

$xmms_remote = Xmms::Remote->new();

sub xmms_handler {
  $title = $xmms_remote->get_playlist_title;
  $title =~ s/_[^_]*_[^_]*_/ - /;
  IRC::command("/me listens to $title");
  return 1;
}