1 package Xchat::XPI::Events;
8 use lib get_info 'xchatdir';
15 our $VERSION = '0.04';
18 my ($cb, @args) = @{$_[0]};
25 $d = (defined $d) ? int $d : DEFAULT_DELAY;
26 return hook_timer $d, \&_delay_cb, { data => \@_ };
31 my ($cb, $to) = @{$_[1]};
33 emit_print $to, @args;
42 return hook_print $from, \&_filter_cb, { data => \@_ };
45 use base qw/Exporter/;
49 'funcs' => [ qw/delay filter/ ],
50 'consts' => [ qw/DEFAULT_DELAY/ ]
52 our @EXPORT_OK = map { @$_ } values %EXPORT_TAGS;
53 $EXPORT_TAGS{'all'} = [ @EXPORT_OK ];