File: Event.pm

package info (click to toggle)
cgiirc 0.5.9-3squeeze1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 896 kB
  • ctags: 443
  • sloc: perl: 9,125; ansic: 163; sh: 99; makefile: 43
file content (22 lines) | stat: -rw-r--r-- 490 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# $Id: Event.pm,v 1.1.1.1 2002/03/05 16:34:19 dgl Exp $
package IRC::Event;

AUTOLOAD {
   return unless defined $AUTOLOAD;
   my $name = $AUTOLOAD;
   $name =~ s/.*:://;
   return if $name eq 'DESTROY';
   if($name && ref $_[0] && $_[0]->{server} && $_[0]->{channel}) {
      $_[0]->{server}->$name($_[0]->{channel}, @_[1..$#_]);
   }
}

sub new {
   my($class,$client) = (shift,shift);
   my $self = bless { }, $class;
   %$self = @_;
   $self->{server} = $client;
   return $self;
}

1;