Changeset 9667006 for perl/modules/jabber.pl
- Timestamp:
- Jan 8, 2007, 4:17:31 PM (18 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:
- 5f576e3
- Parents:
- 6475057
- git-author:
- Nelson Elhage <nelhage@mit.edu> (01/08/07 14:34:12)
- git-committer:
- Nelson Elhage <nelhage@mit.edu> (01/08/07 16:17:31)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
perl/modules/jabber.pl
rcb769bb r9667006 131 131 push @::onMainLoop, sub { owl_jabber::onMainLoop(@_) }; 132 132 push @::onGetBuddyList, sub { owl_jabber::onGetBuddyList(@_) }; 133 } 134 else { 133 } else { 135 134 # Our owl doesn't support queue_message. Unfortunately, this 136 135 # means it probably *also* doesn't support owl::error. So just … … 341 340 subscribed => sub { owl_jabber::process_presence_subscribed(@_) }, 342 341 unsubscribe => sub { owl_jabber::process_presence_unsubscribe(@_) }, 343 unsubscribed => sub { owl_jabber::process_presence_unsubscribed(@_) }); 342 unsubscribed => sub { owl_jabber::process_presence_unsubscribed(@_) }, 343 error => sub { owl_jabber::process_presence_error(@_) }); 344 344 345 345 my $status = $client->Connect( %{ $vars{jlogin_connhash} } ); … … 975 975 } 976 976 977 sub process_presence_error { 978 my ( $sid, $p ) = @_; 979 my $code = $p->GetErrorCode(); 980 my $error = $p->GetError(); 981 owl::error("Jabber: $code $error"); 982 } 983 977 984 978 985 ### Helper functions … … 1070 1077 return '@b[' . $str . ']' if ( $str !~ /\]/ ); 1071 1078 1072 my $txt = " \@b($str";1073 $txt =~ s /\)/\)\@b\[\)\]\@b\(/g;1074 return $txt . ')';1079 my $txt = "$str"; 1080 $txt =~ s{[)]}{)\@b[)]\@b(}g; 1081 return '@b(' . $txt . ')'; 1075 1082 } 1076 1083
Note: See TracChangeset
for help on using the changeset viewer.