use strict; use vars qw($VERSION %IRSSI); use Irssi qw(command_bind signal_add); $VERSION = "0.1"; %IRSSI = ( authors => 'Ty Scicluna', contact => 'ak@ak.net.au', name => 'MP3Script', description => 'Automatically pulls information from an sql database and displays it in the current window for all to see', license => 'Public Domain', url => 'http://not.available.yet/', changed => '' ); # MP3 Display Script # for irssi 0.8.1 by Ty Scicluna my $msghead='^Bautoident^B:'; Irssi::theme_register([ 'mp3script_loaded', '%R>>%n %_Scriptinfo:%_ Loaded $0 version $1 by $2.' ]); sub cmd_print_help { Irssi::print(<{type} ne "CHANNEL" || $witem->{type} ne "QUERY") { Irssi::print('Can not message this window.'); return; } else { $witem->command('me Now playing: '.$current_mp3); } } Irssi::command_bind('help', 'cmd_print_help'); Irssi::command_bind('music', 'cmd_music'); Irssi::printformat(MSGLEVEL_CLIENTCRAP, 'mp3script_loaded', $IRSSI{name}, $VERSION, $IRSSI{authors});