Mercurial > pidgin
diff src/protocols/toc/toc.c @ 2167:edf8c5a70e5b
[gaim-migrate @ 2177]
limiting chat message lengths
committer: Tailor Script <tailor@pidgin.im>
| author | Eric Warmenhoven <eric@warmenhoven.org> |
|---|---|
| date | Sun, 26 Aug 2001 20:21:45 +0000 |
| parents | a464da684307 |
| children | c24595d3c364 |
line wrap: on
line diff
--- a/src/protocols/toc/toc.c Sun Aug 26 19:18:39 2001 +0000 +++ b/src/protocols/toc/toc.c Sun Aug 26 20:21:45 2001 +0000 @@ -945,12 +945,15 @@ sflap_send(g, buf2, -1, TYPE_DATA); } -static void toc_chat_send(struct gaim_connection *g, int id, char *message) +static int toc_chat_send(struct gaim_connection *g, int id, char *message) { char buf[BUF_LEN * 2]; escape_text(message); + if (strlen(message) > 2000) + return -E2BIG; g_snprintf(buf, sizeof(buf), "toc_chat_send %d \"%s\"", id, message); sflap_send(g, buf, -1, TYPE_DATA); + return 0; } static void toc_keepalive(struct gaim_connection *gc)
