| 943 char buf2[BUF_LEN * 2]; |
943 char buf2[BUF_LEN * 2]; |
| 944 g_snprintf(buf2, sizeof(buf2), "toc_chat_whisper %d %s \"%s\"", id, who, message); |
944 g_snprintf(buf2, sizeof(buf2), "toc_chat_whisper %d %s \"%s\"", id, who, message); |
| 945 sflap_send(g, buf2, -1, TYPE_DATA); |
945 sflap_send(g, buf2, -1, TYPE_DATA); |
| 946 } |
946 } |
| 947 |
947 |
| 948 static void toc_chat_send(struct gaim_connection *g, int id, char *message) |
948 static int toc_chat_send(struct gaim_connection *g, int id, char *message) |
| 949 { |
949 { |
| 950 char buf[BUF_LEN * 2]; |
950 char buf[BUF_LEN * 2]; |
| 951 escape_text(message); |
951 escape_text(message); |
| |
952 if (strlen(message) > 2000) |
| |
953 return -E2BIG; |
| 952 g_snprintf(buf, sizeof(buf), "toc_chat_send %d \"%s\"", id, message); |
954 g_snprintf(buf, sizeof(buf), "toc_chat_send %d \"%s\"", id, message); |
| 953 sflap_send(g, buf, -1, TYPE_DATA); |
955 sflap_send(g, buf, -1, TYPE_DATA); |
| |
956 return 0; |
| 954 } |
957 } |
| 955 |
958 |
| 956 static void toc_keepalive(struct gaim_connection *gc) |
959 static void toc_keepalive(struct gaim_connection *gc) |
| 957 { |
960 { |
| 958 sflap_send(gc, "", 0, TYPE_KEEPALIVE); |
961 sflap_send(gc, "", 0, TYPE_KEEPALIVE); |