[559] in BarnOwl Developers

home help back first fref pref prev next nref lref last post

[D-O-H] r675 - trunk/owl/perl/modules

daemon@ATHENA.MIT.EDU (asedeno@MIT.EDU)
Thu Oct 29 18:07:25 2009

Resent-From: nelhage@mit.edu
Resent-To: barnowl-dev-mtg@charon.mit.edu
To: dirty-owl-hackers@mit.edu
From: asedeno@MIT.EDU
Reply-to: dirty-owl-hackers@MIT.EDU
Date: Wed, 21 Mar 2007 21:26:16 -0400 (EDT)

Author: asedeno
Date: 2007-03-21 21:26:16 -0400 (Wed, 21 Mar 2007)
New Revision: 675

Modified:
   trunk/owl/perl/modules/jabber.pl
Log:
Fix the bug in which rejoining a MUC you're already in (nick change)
results in the MUC appearing multiple times when you show presence
info for all MUCs.



Modified: trunk/owl/perl/modules/jabber.pl
===================================================================
--- trunk/owl/perl/modules/jabber.pl	2007-03-19 18:14:33 UTC (rev 674)
+++ trunk/owl/perl/modules/jabber.pl	2007-03-22 01:26:16 UTC (rev 675)
@@ -69,7 +69,9 @@
     my $self = shift;
     my $muc = Net::Jabber::MUC->new(connection => $self, @_);
     $muc->Join(@_);
-    push @{$self->MUCs}, $muc;
+
+    # Add MUC to list of MUCs, unless we're just changing nicks.
+    push @{$self->MUCs}, $muc unless grep {$_->BaseJID eq $muc->BaseJID} $self->MUCs;
 }
 
 =head2 MUCLeave ARGS


home help back first fref pref prev next nref lref last post