diff src/protocols/toc/toc.c @ 2123:56c4382f2909

[gaim-migrate @ 2133] now has the ability to notify you beforehand that messages are too long. I haven't tested this yet though. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Mon, 06 Aug 2001 17:50:46 +0000
parents b66aca8e8dce
children bc79be34eb73
line wrap: on
line diff
--- a/src/protocols/toc/toc.c	Sat Aug 04 01:37:49 2001 +0000
+++ b/src/protocols/toc/toc.c	Mon Aug 06 17:50:46 2001 +0000
@@ -741,14 +741,18 @@
 	return "TOC";
 }
 
-static void toc_send_im(struct gaim_connection *gc, char *name, char *message, int away)
+static int toc_send_im(struct gaim_connection *gc, char *name, char *message, int away)
 {
 	char buf[BUF_LEN * 2];
 
 	escape_text(message);
+	if (strlen(message) + 52 > MSG_LEN)
+		return -E2BIG;
 	g_snprintf(buf, MSG_LEN - 8, "toc_send_im %s \"%s\"%s", normalize(name),
 		   message, ((away) ? " auto" : ""));
 	sflap_send(gc, buf, -1, TYPE_DATA);
+	
+	return 0;
 }
 
 static void toc_set_config(struct gaim_connection *gc)