Changeset 3ad15ff for perl/modules/IRC/lib/BarnOwl/Module/IRC/Connection.pm
- Timestamp:
- Jul 23, 2008, 8:18:30 PM (16 years ago)
- 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:
- 38cfdb5d
- Parents:
- 0398d55
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
perl/modules/IRC/lib/BarnOwl/Module/IRC/Connection.pm
r3835ae8 r3ad15ff 65 65 $self->conn->add_handler(nicknameinuse => sub { shift; $self->on_nickinuse(@_) }); 66 66 $self->conn->add_handler(cping => sub { shift; $self->on_ping(@_) }); 67 $self->conn->add_handler(topic => sub { shift; $self->on_topic(@_) }); 68 $self->conn->add_handler(topicinfo => sub { shift; $self->on_topicinfo(@_) }); 67 69 68 70 return $self; … … 193 195 } 194 196 197 sub on_topic { 198 my ($self, $evt) = @_; 199 my @args = $evt->args; 200 if (scalar @args > 1) { 201 BarnOwl::admin_message("IRC", 202 "Topic for $args[1] on " . $self->alias . " is $args[2]"); 203 } else { 204 BarnOwl::admin_message("IRC", 205 "Topic changed to $args[0]"); 206 } 207 } 208 209 sub on_topicinfo { 210 my ($self, $evt) = @_; 211 my @args = $evt->args; 212 BarnOwl::admin_message("IRC", 213 "Topic for $args[1] set by $args[2] at " . localtime($args[3])); 214 } 215 195 216 sub on_event { 196 217 my ($self, $evt) = @_;
Note: See TracChangeset
for help on using the changeset viewer.