changeset 145:41bd1cd48571

[gaim-migrate @ 155] Modified how the "<AUTO-REPLY>" thing works. Works better now, IMHO. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Fri, 21 Apr 2000 01:25:44 +0000
parents e8dae982b37c
children 99248fb977c2
files src/conversation.c src/server.c
diffstat 2 files changed, 5 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/src/conversation.c	Fri Apr 21 00:03:52 2000 +0000
+++ b/src/conversation.c	Fri Apr 21 01:25:44 2000 +0000
@@ -701,7 +701,6 @@
         char *who = NULL;
         FILE *fd;
         char colour[10];
-	struct buddy *b = NULL;
 
         if (flags & WFLAG_SYSTEM) {
 
@@ -734,18 +733,13 @@
 
                 if (flags & WFLAG_RECV) {
                         strcpy(colour, "#ff0000");
-			b = find_buddy(c->name);
-                        if (b && (b->uc & UC_UNAVAILABLE)) {
-				who = malloc(strlen(c->name) + 24);
-				sprintf(who, "%s: <AUTO-REPLY>", c->name);
-			} else
-				who = c->name;
+			who = c->name;
                 } else if (flags & WFLAG_SEND) {
                         strcpy(colour, "#0000ff");
                         who = current_user->username;
                 }
 
-                if (flags & WFLAG_AUTO && flags & WFLAG_SEND)
+                if (flags & WFLAG_AUTO)
                         sprintf(buf2, " %s", AUTO_RESPONSE);
                 else
                         buf2[0]=0; /* sprintf(buf2, ""); */
@@ -800,8 +794,6 @@
         
 	g_free(buf);
         g_free(buf2);
-	if (flags & WFLAG_RECV && b != NULL && b->uc & UC_UNAVAILABLE)
-		free(who);
 }
 
 
--- a/src/server.c	Fri Apr 21 00:03:52 2000 +0000
+++ b/src/server.c	Fri Apr 21 01:25:44 2000 +0000
@@ -510,6 +510,7 @@
 	g_free(nname);
 	
         cnv = find_conversation(name);
+	if (away) away = WFLAG_AUTO;
 
 	if (awaymessage != NULL) {
 		if (!(general_options & OPT_GEN_DISCARD_WHEN_AWAY)) {
@@ -521,7 +522,7 @@
 		if (cnv != NULL) {
 			if (sound_options & OPT_SOUND_WHEN_AWAY)
 				play_sound(AWAY);
-			write_to_conv(cnv, message, WFLAG_AUTO | WFLAG_RECV);
+			write_to_conv(cnv, message, away | WFLAG_RECV);
 		}
 
 	} else {
@@ -535,7 +536,7 @@
 			if (cnv->makesound && (sound_options & OPT_SOUND_RECV))
 				play_sound(RECEIVE);
 		}
-		write_to_conv(cnv, message, WFLAG_RECV);
+		write_to_conv(cnv, message, away | WFLAG_RECV);
 	}