| 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]; |