Changeset 60b49a7
- Timestamp:
- Apr 3, 2011, 3:06:01 PM (14 years ago)
- Branches:
- master, release-1.10, release-1.8, release-1.9
- Children:
- 0ccf5ab
- Parents:
- 5d4262c
- git-author:
- Nelson Elhage <nelhage@mit.edu> (03/03/11 10:58:42)
- git-committer:
- Nelson Elhage <nelhage@mit.edu> (04/03/11 15:06:01)
- Location:
- perl/modules/IRC/lib/BarnOwl
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
perl/modules/IRC/lib/BarnOwl/Message/IRC.pm
re04b7a1 r60b49a7 66 66 sub action {shift->{action}} 67 67 sub reason {shift->{reason}} 68 sub old_nick {shift->{old_nick}}; 68 69 69 70 # display … … 80 81 } 81 82 82 sub login_extra { 83 sub login_extra { 83 84 my $self = shift; 84 85 if ($self->action eq "quit") { 85 86 return $self->reason; 87 } elsif ($self->action eq 'nick change') { 88 return "was: " . $self->old_nick; 86 89 } else { 87 90 return $self->channel; -
perl/modules/IRC/lib/BarnOwl/Module/IRC/Connection.pm
r5d4262c r60b49a7 122 122 my $self = shift; 123 123 my $evt = shift; 124 my ($nick, $user, $host) = split_prefix($evt); 125 return BarnOwl::Message->new( 124 my %args = ( 126 125 type => 'IRC', 127 126 server => $self->server, 128 127 network => $self->alias, 129 sender => $nick,130 defined($host) ? (hostname => $host) : (),131 from => $evt->{prefix},132 128 @_ 133 129 ); 130 if ($evt) { 131 my ($nick, $user, $host) = split_prefix($evt); 132 $args{sender} ||= $nick; 133 $args{hostname} ||= $host if defined($host); 134 $args{from} ||= $evt->{prefix}; 135 $args{params} ||= join(' ', @{$evt->{params}}) 136 } 137 return BarnOwl::Message->new(%args); 134 138 } 135 139 … … 274 278 "You are now known as $new_nick"); 275 279 } else { 276 BarnOwl::admin_message("IRC", 277 "[" . $self->alias . "] " . 278 "$old_nick is now known as $new_nick"); 280 my $msg = $self->new_message('', 281 loginout => 'login', 282 action => 'nick change', 283 from => $new_nick, 284 sender => $new_nick, 285 replycmd => BarnOwl::quote('irc-msg', '-a', $self->alias, 286 $new_nick), 287 replysendercmd => BarnOwl::quote('irc-msg', '-a', $self->alias, 288 $new_nick), 289 old_nick => $old_nick); 290 BarnOwl::queue_message($msg); 279 291 } 280 292 }
Note: See TracChangeset
for help on using the changeset viewer.