Changeset 9e02bb7 for perl/modules/IRC/lib/BarnOwl/Module/IRC
- Timestamp:
- Jan 11, 2008, 1:38:50 AM (17 years ago)
- Branches:
- master, barnowl_perlaim, debian, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- fe8cad8, 61abb18
- Parents:
- b0c8011
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
perl/modules/IRC/lib/BarnOwl/Module/IRC/Connection.pm
r214b790 r9e02bb7 32 32 bless($self, $class); 33 33 34 $self->add_global_handler(376 => sub { goto &on_connect }); 35 $self->add_global_handler(['msg', 'notice', 'public', 'caction'], 34 $self->add_default_handler(sub { goto &on_event; }); 35 $self->add_handler(376 => sub { goto &on_connect }); 36 $self->add_handler(['msg', 'notice', 'public', 'caction'], 36 37 sub { goto &on_msg }); 37 $self->add_ global_handler(['welcome', 'yourhost', 'created',38 $self->add_handler(['welcome', 'yourhost', 'created', 38 39 'luserclient', 'luserop', 'luserchannels', 'luserme'], 39 40 sub { goto &on_admin_msg }); 40 $self->add_ global_handler(['myinfo', 'map', 'n_local', 'n_global',41 $self->add_handler(['myinfo', 'map', 'n_local', 'n_global', 41 42 'luserconns'], 42 43 sub { }); 43 $self->add_handler(375 => sub { goto &on_motdstart }); 44 $self->add_handler(372 => sub { goto &on_motd }); 45 $self->add_handler(376 => sub { goto &on_endofmotd }); 46 $self->add_global_handler(cping => sub { goto &on_ping }); 47 $self->add_global_handler(join => sub { goto &on_join }); 48 $self->add_global_handler(part => sub { goto &on_part }); 49 $self->add_default_handler(sub { goto &on_event; }); 44 $self->add_handler(motdstart => sub { goto &on_motdstart }); 45 $self->add_handler(motd => sub { goto &on_motd }); 46 $self->add_handler(endofmotd => sub { goto &on_endofmotd }); 47 $self->add_handler(join => sub { goto &on_join }); 48 $self->add_handler(part => sub { goto &on_part }); 49 $self->add_handler(disconnect => sub { goto &on_disconnect }); 50 $self->add_handler(nicknameinuse => sub { goto &on_nickinuse }); 51 $self->add_handler(cping => sub { goto &on_ping }); 50 52 51 53 return $self; … … 147 149 } 148 150 151 sub on_disconnect { 152 my $self = shift; 153 delete $BarnOwl::Module::IRC::ircnets{$self->alias}; 154 155 BarnOwl::admin_message('IRC', 156 "[" . $self->alias . "] Disconnected from server"); 157 } 158 159 sub on_nickinuse { 160 my ($self, $evt) = @_; 161 BarnOwl::admin_message("IRC", 162 "[" . $self->alias . "] " . 163 [$evt->args]->[1] . ": Nick already in use"); 164 } 165 149 166 sub on_event { 150 167 my ($self, $evt) = @_; … … 154 171 if BarnOwl::getvar('irc:spew') eq 'on'; 155 172 } 173 156 174 157 175 ################################################################################
Note: See TracChangeset
for help on using the changeset viewer.