[748] in BarnOwl Developers
[D-O-H] r769 - trunk/owl
daemon@ATHENA.MIT.EDU (austein@MIT.EDU)
Thu Oct 29 18:09:18 2009
Resent-From: nelhage@mit.edu
Resent-To: barnowl-dev-mtg@charon.mit.edu
To: dirty-owl-hackers@mit.edu
From: austein@MIT.EDU
Reply-To: dirty-owl-hackers@MIT.EDU
Date: Sun, 14 Oct 2007 18:16:44 -0400 (EDT)
Author: austein
Date: 2007-10-14 18:16:44 -0400 (Sun, 14 Oct 2007)
New Revision: 769
Modified:
trunk/owl/commands.c
Log:
aimwrite -m displays according to displayoutgoing
Modified: trunk/owl/commands.c
===================================================================
--- trunk/owl/commands.c 2007-10-14 21:16:35 UTC (rev 768)
+++ trunk/owl/commands.c 2007-10-14 22:16:44 UTC (rev 769)
@@ -131,12 +131,10 @@
OWLCMD_ARGS("aimwrite", owl_command_aimwrite, OWL_CTX_INTERACTIVE,
"send an AIM message",
- "aimzwrite <user> [-m <message...>]",
+ "aimwrite <user> [-m <message...>]",
"Send an aim message to a user.\n\n"
"The following options are available:\n\n"
- "-m Specifies a message to send without prompting.\n"
- " Note that this does not yet log an outgoing message.\n"
- " or display the sent message.\n"),
+ "-m Specifies a message to send without prompting.\n"),
OWLCMD_ARGS("loopwrite", owl_command_loopwrite, OWL_CTX_INTERACTIVE,
"send a loopback message",
@@ -1891,6 +1889,7 @@
{
char *newbuff, *recip, **myargv;
int i, j, myargc;
+ owl_message *m;
if (!owl_global_is_aimloggedin(&g)) {
owl_function_makemsg("You are not logged in to AIM.");
@@ -1935,6 +1934,13 @@
recip=owl_malloc(strlen(argv[0])+5);
sprintf(recip, "%s ", argv[1]);
owl_aim_send_im(recip, newbuff);
+ m=owl_function_make_outgoing_aim(newbuff, recip);
+ if (m) {
+ owl_global_messagequeue_addmsg(&g, m);
+ } else {
+ owl_function_error("Could not create outgoing AIM message");
+ }
+
owl_free(recip);
owl_free(newbuff);
return(NULL);