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(<print("You are not connected to a server."); # return; # } elsif (!$witem || $witem->{type} ne "CHANNEL") { # $witem->print($witem, 'No active channel in this window.'); # Irssi::Windowitem::print($channel, "No active channel in this window."); # return; # } $witem->command('me test'.$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});