1 package Xchat::XPI::Events;
8 use lib get_info 'xchatdir';
11 use constant DEFAULT_DELAY => 1000;
13 our $VERSION = '0.04';
16 my ($cb, @args) = @{$_[0]};
29 $delay = DEFAULT_DELAY;
32 hook_timer $delay, \&_delay_cb, { data => \@_ };
37 my ($cb, $to) = @{$_[1]};
40 emit_print $to, @args;
48 hook_print $_[0], \&_filter_cb, { data => \@_ };
51 use base qw<Exporter>;
55 'funcs' => [ qw<delay filter> ],
56 'consts' => [ qw<DEFAULT_DELAY> ],
58 our @EXPORT_OK = map { @$_ } values %EXPORT_TAGS;
59 $EXPORT_TAGS{'all'} = [ @EXPORT_OK ];