Changeset 4df2568 for perl/modules


Ignore:
Timestamp:
Feb 20, 2009, 7:08:36 PM (16 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, debian, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
e625b5e
Parents:
33db995
Message:
IRC: Show admin messages for mode changes.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • perl/modules/IRC/lib/BarnOwl/Module/IRC/Connection.pm

    r330c55a r4df2568  
    7373    $self->conn->add_handler(endofnames=> sub { shift; $self->on_endofnames(@_) });
    7474    $self->conn->add_handler(endofwhois=> sub { shift; $self->on_endofwhois(@_) });
     75    $self->conn->add_handler(mode      => sub { shift; $self->on_mode(@_) });
    7576
    7677    # * nosuchchannel
     
    276277}
    277278
     279sub on_mode {
     280    my ($self, $evt) = @_;
     281    BarnOwl::admin_message("IRC",
     282                           "[" . $self->alias . "] User " . ($evt->nick) . + " set mode " .
     283                           join(" ", $evt->args) . "on " . $evt->to->[0]
     284                          );
     285}
     286
    278287sub on_event {
    279288    my ($self, $evt) = @_;
Note: See TracChangeset for help on using the changeset viewer.