Index: perl/modules/Jabber/lib/BarnOwl/Module/Jabber.pm
===================================================================
--- perl/modules/Jabber/lib/BarnOwl/Module/Jabber.pm	(revision 86840c5efde3c5396848b0ab39c62acfbbe9777a)
+++ perl/modules/Jabber/lib/BarnOwl/Module/Jabber.pm	(revision 892568bf6e3ceea8724cef719078e5f6c2455b16)
@@ -601,6 +601,9 @@
     die("Usage: jmuc part MUC [-a account]") unless $muc;
 
-    $conn->getConnectionFromJID($jid)->MUCLeave(JID => $muc);
-    queue_admin_msg("$jid has left $muc.");
+    if($conn->getConnectionFromJID($jid)->MUCLeave(JID => $muc)) {
+        queue_admin_msg("$jid has left $muc.");
+    } else {
+        die("Error: Not joined to $muc");
+    }
 }
 
@@ -641,6 +644,23 @@
     my $m = shift;
     my @jids = $m->Presence();
-    return "JIDs present in " . $m->BaseJID . "\n\t"
-      . join("\n\t", map {$_->GetResource}@jids) . "\n";
+
+    my $presence = "JIDs present in " . $m->BaseJID;
+    if($m->Anonymous) {
+        $presence .= " [anonymous MUC]";
+    }
+    $presence .= "\n\t";
+    $presence .= join("\n\t", map {pp_jid($m, $_);} @jids) . "\n";
+    return $presence;
+}
+
+sub pp_jid {
+    my ($m, $jid) = @_;
+    my $nick = $jid->GetResource;
+    my $full = $m->GetFullJID($jid);
+    if($full && $full ne $nick) {
+        return "$nick ($full)";
+    } else {
+        return "$nick";
+    }
 }
 
Index: perl/modules/Jabber/lib/BarnOwl/Module/Jabber/Connection.pm
===================================================================
--- perl/modules/Jabber/lib/BarnOwl/Module/Jabber/Connection.pm	(revision 3c455b40331c014fd3d113629a3fd670bb6ffd4f)
+++ perl/modules/Jabber/lib/BarnOwl/Module/Jabber/Connection.pm	(revision 892568bf6e3ceea8724cef719078e5f6c2455b16)
@@ -52,4 +52,7 @@
 Leave a MUC. The MUC is specified in the same form as L</FindMUC>
 
+Returns true if successful, false if this connection was not in the
+named MUC.
+
 =cut
 
@@ -61,4 +64,5 @@
     $muc->Leave();
     $self->{_BARNOWL_MUCS} = [grep {$_->BaseJID ne $muc->BaseJID} $self->MUCs];
+    return 1;
 }
 
Index: perl/modules/Jabber/lib/Net/Jabber/MUC.pm
===================================================================
--- perl/modules/Jabber/lib/Net/Jabber/MUC.pm	(revision c2bed5539d456612d69de33e1dacc3afe5f70395)
+++ perl/modules/Jabber/lib/Net/Jabber/MUC.pm	(revision 892568bf6e3ceea8724cef719078e5f6c2455b16)
@@ -64,4 +64,5 @@
     $self->{JID} = $args{jid};
     $self->{PRESENCE} = { };
+    $self->{ANONYMOUS} = 1;
 
     bless($self, $class);
@@ -188,5 +189,13 @@
         delete $self->{PRESENCE}->{$from->GetJID('full')};
     } elsif($type eq 'available') {
-        $self->{PRESENCE}->{$from->GetJID('full')} = $from;
+        $self->{PRESENCE}->{$from->GetJID('full')} = {ROOMNICK => $from};
+        my $x = $presence->GetX('http://jabber.org/protocol/muc#user');
+        if($x && $x->DefinedItem()) {
+            my $item = $x->GetItem();
+            if($item->DefinedJID()) {
+                $self->{PRESENCE}->{$from->GetJID('full')}->{FULLJID} = $item->GetJID();
+                $self->{ANONYMOUS} = 0;
+            }
+        }
     }
 }
@@ -207,4 +216,22 @@
 }
 
+=head2 GetFullJID roomjid
+
+Given the roomnick of a user in the MUC, return their full NIC if the
+MUC makes it available. If the MUC is anonymous or the user does not
+exist in the MUC, return undef.
+
+=cut
+
+sub GetFullJID {
+    my $self = shift;
+    my $jid = shift;
+
+    $jid = $jid->GetJID('full') if UNIVERSAL::isa($jid, 'Net::Jabber::JID');
+    my $pres = $self->{PRESENCE}->{$jid};
+    return unless $pres;
+    return $pres->{FULLJID};
+}
+
 =head2 Presence
 
@@ -215,5 +242,16 @@
 sub Presence {
     my $self = shift;
-    return values %{$self->{PRESENCE}};
+    return map {$_->{ROOMNICK}} values %{$self->{PRESENCE}};
+}
+
+=head2 Anonymous
+
+Returns true if the MUC is anonymous (hides participants real JIDs)
+
+=cut
+
+sub Anonymous {
+    my $self = shift;
+    return $self->{ANONYMOUS};
 }
 
