[319] in BarnOwl Developers
[D-O-H] r463 - / trunk/owl/perl/modules
daemon@ATHENA.MIT.EDU (nelhage@MIT.EDU)
Thu Oct 29 18:04:52 2009
Resent-From: nelhage@mit.edu
Resent-To: barnowl-dev-mtg@charon.mit.edu
To: dirty-owl-hackers@mit.edu
From: nelhage@MIT.EDU
Reply-to: dirty-owl-hackers@MIT.EDU
Date: Mon, 13 Nov 2006 23:06:54 -0500 (EST)
Author: nelhage
Date: 2006-11-13 23:06:54 -0500 (Mon, 13 Nov 2006)
New Revision: 463
Modified:
/
trunk/owl/perl/modules/jabber.pl
Log:
r23965@heretique: nelhage | 2006-11-13 23:06:48 -0500
Update to use new N::J MUC features
Property changes on:
___________________________________________________________________
Name: svk:merge
- 6122c8b4-0e12-0410-9533-8bcd7c66c992:/local/dirty-owl-hacks:23964
6aa88b72-b502-0410-8cb4-a5dd0230fb79:/owl-local:1356
+ 6122c8b4-0e12-0410-9533-8bcd7c66c992:/local/dirty-owl-hacks:23965
6aa88b72-b502-0410-8cb4-a5dd0230fb79:/owl-local:1356
Modified: trunk/owl/perl/modules/jabber.pl
===================================================================
--- trunk/owl/perl/modules/jabber.pl 2006-11-14 04:06:52 UTC (rev 462)
+++ trunk/owl/perl/modules/jabber.pl 2006-11-14 04:06:54 UTC (rev 463)
@@ -453,17 +453,14 @@
$muc = shift @ARGV
or die("Usage: jmuc join {muc} [-p password] [-a account]");
- my $x = new XML::Stream::Node('x');
- $x->put_attrib( xmlns => 'http://jabber.org/protocol/muc' );
- $x->add_child('history')->put_attrib( maxchars => '0' );
-
+ my $presence = new Net::Jabber::Presence;
+ $presence->SetPresence( to => $muc );
+ my $x = $presence->NewChild('http://jabber.org/protocol/muc');
+ $x->AddHistory()->SetMaxChars(0);
if ($password) {
- $x->add_child('password')->add_cdata($password);
+ $x->SetPassword($password);
}
- my $presence = new Net::Jabber::Presence;
- $presence->SetPresence( to => $muc );
- $presence->AddX($x);
$connections->{$jid}->{client}->Send($presence);
}
@@ -496,11 +493,6 @@
queue_admin_msg("$jid has invited $invite_jid to $muc.");
}
-Net::Jabber::Namespaces::add_ns(
- ns => "http://jabber.org/protocol/muc#owner",
- tag => 'query',
-);
-
sub jmuc_configure {
my ( $jid, $muc, @args ) = @_;
$muc = shift @args if scalar @args;