Old stuff/Perl/xchat/xmms.pl
(Deskargatu)#!/usr/bin/perl -w
IRC::register('xmms by tfe','0.1','','');
IRC::add_command_handler("xmms","xmms_ft");
my $title;
sub xmms_ft
{
$_ = shift;
open(INFO,"/tmp/xmms-info");
while(<INFO>)
{
if (/Title: (.*)/) { $title = $1; }
elsif (/Channels: (.*)/) { $channels = $1; }
elsif (/Samping Frequency: (.*)/) { $frequence = $1; }
elsif (/Status: (.*)/) { $status = $1; }
}
IRC::command("$status:$title ($channels channels-$frequence Khz)\n");
$_ = "";
return 0;
}