diff src/server.c @ 12114:2cbb5993c819

[gaim-migrate @ 14414] Killed stylize(). No more gtk in server.c. Next stop: No more server.c. It looks like also the auto-response code was leaking, so that's fixed now. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Wed, 16 Nov 2005 16:59:22 +0000
parents 3b536c791a64
children e75ef7aa913e
line wrap: on
line diff
--- a/src/server.c	Wed Nov 16 08:49:46 2005 +0000
+++ b/src/server.c	Wed Nov 16 16:59:22 2005 +0000
@@ -34,10 +34,6 @@
 #include "status.h"
 #include "util.h"
 
-/* XXX UI Stuff */
-#include "gaim.h"
-#include "gtkutils.h"
-
 #define SECS_BEFORE_RESENDING_AUTORESPONSE 600
 #define SEX_BEFORE_RESENDING_AUTORESPONSE "Only after you're married"
 
@@ -552,7 +548,6 @@
 	if (!gaim_presence_is_available(presence))
 	{
 		time_t t = time(NULL);
-		char *tmpmsg;
 		GaimBuddy *b = gaim_find_buddy(gc->account, name);
 		const char *alias = b ? gaim_buddy_get_alias(b) : name;
 		struct last_auto_response *lar;
@@ -684,14 +679,9 @@
 		if ((away_msg == NULL) || (*away_msg == '\0'))
 			return;
 
-		/* apply default fonts and colors */
-		/* TODO: Do we even need this? */
-		tmpmsg = stylize(away_msg, MSG_LEN);
-
 		/* Move this to oscar.c! */
-		buffy = gaim_str_sub_away_formatters(tmpmsg, alias);
+		buffy = gaim_str_sub_away_formatters(away_msg, alias);
 		serv_send_im(gc, name, buffy, GAIM_CONV_IM_AUTO_RESP);
-		g_free(buffy);
 
 #if 0
 		if (!cnv && awayqueue &&
@@ -701,7 +691,7 @@
 
 			qm = g_new0(struct queued_message, 1);
 			g_snprintf(qm->name, sizeof(qm->name), "%s", name);
-			qm->message = g_strdup(gaim_str_sub_away_formatters(tmpmsg, alias));
+			qm->message = g_strdup(buffy);
 			qm->account = gc->account;
 			qm->tm = mtime;
 			qm->flags = GAIM_MESSAGE_SEND | GAIM_MESSAGE_AUTO_RESP;
@@ -710,13 +700,12 @@
 		else if (cnv != NULL)
 #endif
 		{
-			gaim_conv_im_write(GAIM_CONV_IM(cnv), NULL,
-							   gaim_str_sub_away_formatters(tmpmsg, alias),
+			gaim_conv_im_write(GAIM_CONV_IM(cnv), NULL, buffy,
 							   GAIM_MESSAGE_SEND | GAIM_MESSAGE_AUTO_RESP,
 							   mtime);
 		}
 
-		g_free(tmpmsg);
+		g_free(buffy);
 	}
 	else
 	{