comparison 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
comparison
equal deleted inserted replaced
2122:c99c781e5931 2123:56c4382f2909
739 static char *toc_name() 739 static char *toc_name()
740 { 740 {
741 return "TOC"; 741 return "TOC";
742 } 742 }
743 743
744 static void toc_send_im(struct gaim_connection *gc, char *name, char *message, int away) 744 static int toc_send_im(struct gaim_connection *gc, char *name, char *message, int away)
745 { 745 {
746 char buf[BUF_LEN * 2]; 746 char buf[BUF_LEN * 2];
747 747
748 escape_text(message); 748 escape_text(message);
749 if (strlen(message) + 52 > MSG_LEN)
750 return -E2BIG;
749 g_snprintf(buf, MSG_LEN - 8, "toc_send_im %s \"%s\"%s", normalize(name), 751 g_snprintf(buf, MSG_LEN - 8, "toc_send_im %s \"%s\"%s", normalize(name),
750 message, ((away) ? " auto" : "")); 752 message, ((away) ? " auto" : ""));
751 sflap_send(gc, buf, -1, TYPE_DATA); 753 sflap_send(gc, buf, -1, TYPE_DATA);
754
755 return 0;
752 } 756 }
753 757
754 static void toc_set_config(struct gaim_connection *gc) 758 static void toc_set_config(struct gaim_connection *gc)
755 { 759 {
756 char buf[MSG_LEN], snd[BUF_LEN * 2]; 760 char buf[MSG_LEN], snd[BUF_LEN * 2];