]> git.vpit.fr Git - perl/scripts/xchat.git/blobdiff - Xchat/XPI/Events.pm
Fix Xchat::XPI::Events::{delay,filter} not passing the right arguments
[perl/scripts/xchat.git] / Xchat / XPI / Events.pm
index 3bb797ffd1930287f46b0c9b696449dc2ce9984b..d851caaeb961d04e705cd3753527ff4d627cd006 100644 (file)
@@ -5,9 +5,6 @@ use warnings;
 
 use Xchat qw<:all>;
 
-use lib get_info 'xchatdir';
-use Xchat::XPI;
-
 use constant DEFAULT_DELAY => 1000;
 
 our $VERSION = '0.04';
@@ -21,7 +18,7 @@ sub _delay_cb {
 }
 
 sub delay {
- my $delay = $_[0];
+ my $delay = shift;
 
  if (defined $delay) {
   $delay = int $delay;
@@ -45,7 +42,9 @@ sub _filter_cb {
 }
 
 sub filter {
- hook_print $_[0], \&_filter_cb, { data => \@_ };
+ my $from = shift;
+
+ hook_print $from, \&_filter_cb, { data => \@_ };
 }
 
 use base qw<Exporter>;