Changeset 0a3f04d


Ignore:
Timestamp:
Jan 23, 2007, 6:36:27 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:
0ad0e97
Parents:
acee046
git-author:
Nelson Elhage <nelhage@mit.edu> (01/23/07 18:34:46)
git-committer:
Nelson Elhage <nelhage@mit.edu> (01/23/07 18:36:27)
Message:
Some bugfixing to JID guessing.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • perl/modules/jabber.pl

    r455f1ab r0a3f04d  
    582582
    583583    ($jwrite_from, $jwrite_to, $jwrite_type) = guess_jwrite($jwrite_from, $to);
    584 
    585     unless($jwrite_from && $jwrite_to) {
     584   
     585    unless($jwrite_to) {
    586586        die("Unable to resolve JID $to");
     587    }
     588
     589    unless($jwrite_from) {
     590        die("Unable to resolve account");
    587591    }
    588592   
     
    12891293sub resolveDestJID {
    12901294    my ($to, $from) = @_;
     1295    return $to if $to =~ /@/;
    12911296    my $jid = Net::Jabber::JID->new($to);
    1292     if($jid->GetResource()) {
    1293         return $jid->GetJID('full');
    1294     }
    12951297
    12961298    my $roster = $conn->getRosterFromJID($from);
     
    13271329        $to_jid = $to;
    13281330        $from_jid = defaultJID();
    1329         die("You must specify a JID with -a") unless $from_jid;
     1331        die("You must specify an account with -a") unless $from_jid;
    13301332    } else {
    13311333        for my $f ($conn->getJids) {
Note: See TracChangeset for help on using the changeset viewer.