[314] in BarnOwl Developers
[D-O-H] r459 - / trunk/owl/perl/modules
daemon@ATHENA.MIT.EDU (nelhage@MIT.EDU)
Thu Oct 29 18:04:48 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: Fri, 10 Nov 2006 15:47:57 -0500 (EST)
Author: nelhage
Date: 2006-11-10 15:47:57 -0500 (Fri, 10 Nov 2006)
New Revision: 459
Modified:
/
trunk/owl/perl/modules/jabber.pl
Log:
r23955@heretique: nelhage | 2006-11-10 15:47:50 -0500
Making reply-sender work right in chats
Property changes on:
___________________________________________________________________
Name: svk:merge
- 6122c8b4-0e12-0410-9533-8bcd7c66c992:/local/dirty-owl-hacks:23953
6aa88b72-b502-0410-8cb4-a5dd0230fb79:/owl-local:1356
+ 6122c8b4-0e12-0410-9533-8bcd7c66c992:/local/dirty-owl-hacks:23955
6aa88b72-b502-0410-8cb4-a5dd0230fb79:/owl-local:1356
Modified: trunk/owl/perl/modules/jabber.pl
===================================================================
--- trunk/owl/perl/modules/jabber.pl 2006-11-10 18:13:37 UTC (rev 458)
+++ trunk/owl/perl/modules/jabber.pl 2006-11-10 20:47:57 UTC (rev 459)
@@ -392,8 +392,8 @@
};
owl::message(
-"Type your message below. End with a dot on a line by itself. ^C will quit."
- );
+ "Type your message below. End with a dot on a line by itself. ^C will quit."
+ );
owl::start_edit_win( join( ' ', @args ), \&process_owl_jwrite );
}
@@ -540,6 +540,7 @@
}
$connections->{ $vars{jwrite}{from} }->{client}->Send($j);
delete $vars{jwrite};
+ owl::message(""); # Kludge to make the ``type your message...'' message go away
}
### XMPP Callbacks
@@ -611,6 +612,8 @@
$props{from} = $from->GetJID('full');
$props{to} = $to->GetJID('full');
+ my $account = ( $dir eq 'out' ) ? $props{from} : $props{to};
+
$props{recipient} = $to->GetJID('base');
$props{sender} = $from->GetJID('base');
$props{subject} = $j->GetSubject() if ( $j->DefinedSubject() );
@@ -622,18 +625,17 @@
if ( $jtype eq 'chat' ) {
$props{replycmd} =
- "jwrite " . ( ( $dir eq 'in' ) ? $props{from} : $props{to} );
- $props{replycmd} .=
- " -a " . ( ( $dir eq 'out' ) ? $props{from} : $props{to} );
+ "jwrite " . ( ( $dir eq 'in' ) ? $props{from} : $props{to} ) . " -a $account";
$props{isprivate} = 1;
+ $props{replysendercmd} = $props{replycmd};
}
elsif ( $jtype eq 'groupchat' ) {
my $nick = $props{nick} = $from->GetResource();
my $room = $props{room} = $from->GetJID('base');
- $props{replycmd} = "jwrite -g $room";
- $props{replycmd} .=
- " -a " . ( ( $dir eq 'out' ) ? $props{from} : $props{to} );
+ $props{replycmd} = "jwrite -g $room -a $account";
+ $props{replysendercmd} = "jwrite " . $from->GetJID('full') . " -a $account";
+
$props{sender} = $nick || $room;
$props{recipient} = $room;
@@ -658,7 +660,6 @@
. $props{error};
}
- $props{replysendercmd} = $props{replycmd};
return %props;
}