Changeset d9f4a5c for perl


Ignore:
Timestamp:
Nov 10, 2006, 1:13:37 PM (18 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:
005562f
Parents:
b405ff6
git-author:
Nelson Elhage <nelhage@mit.edu> (11/10/06 13:11:13)
git-committer:
Nelson Elhage <nelhage@mit.edu> (11/10/06 13:13:37)
Message:
Refactoring jmuc_invite slightly
File:
1 edited

Legend:

Unmodified
Added
Removed
  • perl/modules/jabber.pl

    rb405ff6 rd9f4a5c  
    146146              . "            Invite {jid} to [muc].\n"
    147147              . "            The muc is taken from the current message if not supplied.\n\n"
    148               . "configure [muc]\n" "            Configure [muc].\n"
     148              . "configure [muc]\n"
     149              . "            Configure [muc].\n"
    149150              . "            Necessary to initalize a new MUC",
    150151            usage => "jmuc {command} {args}"
     
    487488      unless $muc && $invite_jid;
    488489
    489     my $x = new XML::Stream::Node('x');
    490     $x->put_attrib( xmlns => 'http://jabber.org/protocol/muc#user' );
    491     $x->add_child('invite')->put_attrib( to => $invite_jid );
    492 
    493     my $message = new Net::Jabber::Message;
     490    my $message = Net::Jabber::Message->new();
    494491    $message->SetTo($muc);
    495     $message->AddX($x);
     492    my $x = $message->NewChild('http://jabber.org/protocol/muc#user');
     493    $x->AddInvite();
     494    $x->GetInvite()->SetTo($invite_jid);
    496495    $connections->{$jid}->{client}->Send($message);
    497496    queue_admin_msg("$jid has invited $invite_jid to $muc.");
Note: See TracChangeset for help on using the changeset viewer.