]> git.vpit.fr Git - perl/scripts/xchat.git/blobdiff - mpd.pl
Make sure local_context() runs the code only when the context was found
[perl/scripts/xchat.git] / mpd.pl
diff --git a/mpd.pl b/mpd.pl
index 440fea7702f2e8563647f93be546564ed867eb75..295bae4f9ceba76f2552ba8acecf34a6064d3135 100755 (executable)
--- a/mpd.pl
+++ b/mpd.pl
@@ -5,9 +5,9 @@ use warnings;
 
 use Audio::MPD;
 
-use Xchat qw/:all/;
+use Xchat qw<:all>;
 
-use lib get_info 'xchatdir'; 
+use lib get_info 'xchatdir';
 use Xchat::XPI;
 
 our $VERSION = 0.04;
@@ -50,13 +50,15 @@ hook_command $_, sub {
  return EAT_ALL;
 }, {
  help_text => "$_, output which song is currently played by mpd"
-} for qw/MPD NP/;
-
-$ph = new Xchat::XPI name   => 'MPD Client',
-                     tag    => 'MPD',
-                     desc   => 'Music Player Daemon client',
-                     author => 'Vincent Pit (VPIT)',
-                     email  => 'perl@profvince.com',
-                     url    => 'http://www.profvince.com';
+} for qw<MPD NP>;
+
+$ph = Xchat::XPI->new(
+ name   => 'MPD Client',
+ tag    => 'MPD',
+ desc   => 'Music Player Daemon client',
+ author => 'Vincent Pit (VPIT)',
+ email  => 'perl@profvince.com',
+ url    => 'http://www.profvince.com',
+);
 
 1;