Changeset 892568b for perl/modules/Jabber/lib/BarnOwl/Module
- Timestamp:
- Sep 12, 2007, 10:46:17 PM (17 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:
- 6711361
- Parents:
- 86840c5
- Location:
- perl/modules/Jabber/lib/BarnOwl/Module
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
perl/modules/Jabber/lib/BarnOwl/Module/Jabber.pm
r86840c5 r892568b 601 601 die("Usage: jmuc part MUC [-a account]") unless $muc; 602 602 603 $conn->getConnectionFromJID($jid)->MUCLeave(JID => $muc); 604 queue_admin_msg("$jid has left $muc."); 603 if($conn->getConnectionFromJID($jid)->MUCLeave(JID => $muc)) { 604 queue_admin_msg("$jid has left $muc."); 605 } else { 606 die("Error: Not joined to $muc"); 607 } 605 608 } 606 609 … … 641 644 my $m = shift; 642 645 my @jids = $m->Presence(); 643 return "JIDs present in " . $m->BaseJID . "\n\t" 644 . join("\n\t", map {$_->GetResource}@jids) . "\n"; 646 647 my $presence = "JIDs present in " . $m->BaseJID; 648 if($m->Anonymous) { 649 $presence .= " [anonymous MUC]"; 650 } 651 $presence .= "\n\t"; 652 $presence .= join("\n\t", map {pp_jid($m, $_);} @jids) . "\n"; 653 return $presence; 654 } 655 656 sub pp_jid { 657 my ($m, $jid) = @_; 658 my $nick = $jid->GetResource; 659 my $full = $m->GetFullJID($jid); 660 if($full && $full ne $nick) { 661 return "$nick ($full)"; 662 } else { 663 return "$nick"; 664 } 645 665 } 646 666 -
perl/modules/Jabber/lib/BarnOwl/Module/Jabber/Connection.pm
r3c455b4 r892568b 52 52 Leave a MUC. The MUC is specified in the same form as L</FindMUC> 53 53 54 Returns true if successful, false if this connection was not in the 55 named MUC. 56 54 57 =cut 55 58 … … 61 64 $muc->Leave(); 62 65 $self->{_BARNOWL_MUCS} = [grep {$_->BaseJID ne $muc->BaseJID} $self->MUCs]; 66 return 1; 63 67 } 64 68
Note: See TracChangeset
for help on using the changeset viewer.