Changeset 005562f


Ignore:
Timestamp:
Nov 10, 2006, 3:47:57 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:
3405394
Parents:
d9f4a5c
git-author:
Nelson Elhage <nelhage@mit.edu> (11/10/06 15:47:50)
git-committer:
Nelson Elhage <nelhage@mit.edu> (11/10/06 15:47:57)
Message:
Making reply-sender work right in chats
File:
1 edited

Legend:

Unmodified
Added
Removed
  • perl/modules/jabber.pl

    rd9f4a5c r005562f  
    393393
    394394    owl::message(
    395 "Type your message below.  End with a dot on a line by itself.  ^C will quit."
    396     );
     395        "Type your message below.  End with a dot on a line by itself.  ^C will quit."
     396       );
    397397    owl::start_edit_win( join( ' ', @args ), \&process_owl_jwrite );
    398398}
     
    541541    $connections->{ $vars{jwrite}{from} }->{client}->Send($j);
    542542    delete $vars{jwrite};
     543    owl::message("");   # Kludge to make the ``type your message...'' message go away
    543544}
    544545
     
    612613    $props{to}   = $to->GetJID('full');
    613614
     615    my $account = ( $dir eq 'out' ) ? $props{from} : $props{to};
     616
    614617    $props{recipient}  = $to->GetJID('base');
    615618    $props{sender}     = $from->GetJID('base');
     
    623626    if ( $jtype eq 'chat' ) {
    624627        $props{replycmd} =
    625           "jwrite " . ( ( $dir eq 'in' ) ? $props{from} : $props{to} );
    626         $props{replycmd} .=
    627           " -a " . ( ( $dir eq 'out' ) ? $props{from} : $props{to} );
     628          "jwrite " . ( ( $dir eq 'in' ) ? $props{from} : $props{to} ) . " -a $account";
    628629        $props{isprivate} = 1;
     630        $props{replysendercmd} = $props{replycmd};
    629631    }
    630632    elsif ( $jtype eq 'groupchat' ) {
    631633        my $nick = $props{nick} = $from->GetResource();
    632634        my $room = $props{room} = $from->GetJID('base');
    633         $props{replycmd} = "jwrite -g $room";
    634         $props{replycmd} .=
    635           " -a " . ( ( $dir eq 'out' ) ? $props{from} : $props{to} );
     635        $props{replycmd} = "jwrite -g $room -a $account";
     636
     637        $props{replysendercmd} = "jwrite " . $from->GetJID('full') . " -a $account";
    636638
    637639        $props{sender} = $nick || $room;
     
    659661    }
    660662
    661     $props{replysendercmd} = $props{replycmd};
    662663    return %props;
    663664}
Note: See TracChangeset for help on using the changeset viewer.