Changeset 6e9e50e


Ignore:
Timestamp:
Nov 13, 2006, 11:06:54 PM (17 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
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:
84296f6
Parents:
d7c2ce6
git-author:
Nelson Elhage <nelhage@mit.edu> (11/13/06 23:06:48)
git-committer:
Nelson Elhage <nelhage@mit.edu> (11/13/06 23:06:54)
Message:
Update to use new N::J MUC features
File:
1 edited

Legend:

Unmodified
Added
Removed
  • perl/modules/jabber.pl

    r005562f r6e9e50e  
    454454      or die("Usage: jmuc join {muc} [-p password] [-a account]");
    455455
    456     my $x = new XML::Stream::Node('x');
    457     $x->put_attrib( xmlns => 'http://jabber.org/protocol/muc' );
    458     $x->add_child('history')->put_attrib( maxchars => '0' );
    459 
    460     if ($password) {
    461         $x->add_child('password')->add_cdata($password);
    462     }
    463 
    464456    my $presence = new Net::Jabber::Presence;
    465457    $presence->SetPresence( to => $muc );
    466     $presence->AddX($x);
     458    my $x = $presence->NewChild('http://jabber.org/protocol/muc');
     459    $x->AddHistory()->SetMaxChars(0);
     460    if ($password) {
     461        $x->SetPassword($password);
     462    }
     463
    467464    $connections->{$jid}->{client}->Send($presence);
    468465}
     
    496493    queue_admin_msg("$jid has invited $invite_jid to $muc.");
    497494}
    498 
    499 Net::Jabber::Namespaces::add_ns(
    500     ns  => "http://jabber.org/protocol/muc#owner",
    501     tag => 'query',
    502 );
    503495
    504496sub jmuc_configure {
Note: See TracChangeset for help on using the changeset viewer.