diff src/protocols/toc/toc.c @ 12216:4d3119205a33

[gaim-migrate @ 14518] Remove GaimConvImFlags and GaimConvChatFlags - use GaimMessageFlags everywhere instead. Add a new GAIM_MESSAGE_IMAGES flag, and set it when sending a message containing images. When sending a message, the core will now always send "html" to the prpls, just like it expects to receive html from the prpls for received messages. This will allow text prpls such as SILC to support IM images and differentiate them from user input. Previously gaim_unescape_html() was used before passing the message to the prpl, now the prpl does this itself if it needs it. I think I updated all the prpls correctly, but I'm not so sure about sametime. committer: Tailor Script <tailor@pidgin.im>
author Stu Tomlinson <stu@nosnilmot.com>
date Thu, 24 Nov 2005 20:47:46 +0000
parents cbebda5f019c
children 2926e3c3185e
line wrap: on
line diff
--- a/src/protocols/toc/toc.c	Thu Nov 24 20:38:24 2005 +0000
+++ b/src/protocols/toc/toc.c	Thu Nov 24 20:47:46 2005 +0000
@@ -806,7 +806,7 @@
 			message++;
 		message++;
 
-		a = (away && (*away == 'T')) ? GAIM_CONV_IM_AUTO_RESP : 0;
+		a = (away && (*away == 'T')) ? GAIM_MESSAGE_AUTO_RESP : 0;
 
 		serv_got_im(gc, c, message, a, time(NULL));
 	} else if (!g_ascii_strcasecmp(c, "UPDATE_BUDDY")) {
@@ -890,7 +890,7 @@
 		serv_got_joined_chat(gc, id, name);
 	} else if (!g_ascii_strcasecmp(c, "CHAT_IN")) {
 		int id;
-		GaimConvChatFlags flags;
+		GaimMessageFlags flags;
 		char *m, *who, *whisper;
 
 		sscanf(strtok(NULL, ":"), "%d", &id);
@@ -901,7 +901,7 @@
 			m++;
 		m++;
 
-		flags = (whisper && (*whisper == 'T')) ? GAIM_CONV_CHAT_WHISPER : 0;
+		flags = (whisper && (*whisper == 'T')) ? GAIM_MESSAGE_WHISPER : 0;
 
 		serv_got_chat_in(gc, id, who, flags, m, time((time_t)NULL));
 	} else if (!g_ascii_strcasecmp(c, "CHAT_UPDATE_BUDDY")) {
@@ -1142,7 +1142,7 @@
 	}
 }
 
-static int toc_send_im(GaimConnection *gc, const char *name, const char *message, GaimConvImFlags flags)
+static int toc_send_im(GaimConnection *gc, const char *name, const char *message, GaimMessageFlags flags)
 {
 	char *buf1, *buf2;
 
@@ -1154,7 +1154,7 @@
 		return -E2BIG;
 	}
 	buf2 = g_strdup_printf("toc_send_im %s \"%s\"%s", gaim_normalize(gc->account, name), buf1,
-						   ((flags & GAIM_CONV_IM_AUTO_RESP) ? " auto" : ""));
+						   ((flags & GAIM_MESSAGE_AUTO_RESP) ? " auto" : ""));
 	g_free(buf1);
 #else
 	/* This doesn't work yet.  See the comments below for details */
@@ -1178,7 +1178,7 @@
 	}
 
 	buf2 = g_strdup_printf("toc2_send_im_enc %s F U en \"%s\" %s", gaim_normalize(gc->account, name), buf1, 
-						   ((flags & GAIM_CONV_IM_AUTO_RESP) ? "auto" : ""));
+						   ((flags & GAIM_MESSAGE_AUTO_RESP) ? "auto" : ""));
 	g_free(buf1);
 #endif
 
@@ -1455,7 +1455,7 @@
 	g_free(buf2);
 }
 
-static int toc_chat_send(GaimConnection *g, int id, const char *message)
+static int toc_chat_send(GaimConnection *g, int id, const char *message, GaimMessageFlags flags)
 {
 	char *buf1, *buf2;
 	buf1 = escape_text(message);