1 package Xchat::XPI::Events;
8 use lib get_info 'xchatdir';
15 our $VERSION = '0.03';
21 $d = (defined $d) ? int $d : DEFAULT_DELAY;
22 return hook_timer $d, sub {
23 my ($cb, $data) = @{$_[0]};
32 return unless @_ == 3;
33 not defined and return for @_;
34 my ($cb, $to) = @_[1, 2];
35 return hook_print $_[0], sub {
38 $reorder{$to}->(@args) if exists $reorder{$to};
39 emit_print $to, @args;
47 use base qw/Exporter/;
51 'funcs' => [ qw/delay filter/ ],
52 'consts' => [ qw/DEFAULT_DELAY/ ]
54 our @EXPORT_OK = map { @$_ } values %EXPORT_TAGS;
55 $EXPORT_TAGS{'all'} = [ @EXPORT_OK ];
57 $ph = new Xchat::XPI name => 'Extended Xchat Perl Interface :: Events',
59 desc => 'More events handlers',
60 author => 'Vincent Pit (VPIT)',
61 email => 'perl@profvince.com',
62 url => 'http://www.profvince.com';