Changeset 31cf416
- Timestamp:
- Jan 11, 2007, 5:29:21 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:
- 1dfc7df
- Parents:
- 30c735c
- git-author:
- Nelson Elhage <nelhage@mit.edu> (01/11/07 17:26:44)
- git-committer:
- Nelson Elhage <nelhage@mit.edu> (01/11/07 17:29:21)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
perl/lib/Net/Jabber/MUC.pm
r004caa5 r31cf416 55 55 $jid = Net::Jabber::JID->new($jid) unless UNIVERSAL::isa($jid, 'Net::Jabber::JID'); 56 56 $args{jid} = $jid; 57 } els eif($args{room} && $args{server} && $args{nick}) {57 } elsif($args{room} && $args{server} && $args{nick}) { 58 58 $args{jid} = New::Jabber::JID->new($args{room}."@".$args{server}."/".$args{nick}); 59 59 } else { … … 166 166 my $sid = shift; 167 167 my $packet = shift; 168 168 169 169 $self->_handlePresence($packet) if $packet->GetTag() eq "presence"; 170 170 } … … 181 181 182 182 my $type = $presence->GetType() || "available"; 183 my $from = $presence->GetFrom(); 184 185 return unless $from->GetJid('base') eq $self->BaseJID; 186 187 if($type eq 'available') { 183 my $from = Net::Jabber::JID->new($presence->GetFrom()); 184 185 return unless $from->GetJID('base') eq $self->BaseJID; 186 187 owl::error('JID matches'); 188 189 if($type eq 'unavailable') { 188 190 delete $self->{PRESENCE}->{$from->GetJID('full')}; 189 } els e{191 } elsif($type eq 'available') { 190 192 $self->{PRESENCE}->{$from->GetJID('full')} = $from; 191 193 } … … 215 217 sub Presence { 216 218 my $self = shift; 217 return keys %{$self->{PRESENCE}}; 218 } 219 return values %{$self->{PRESENCE}}; 220 } 221 222 1;
Note: See TracChangeset
for help on using the changeset viewer.