Mercurial > pidgin
comparison src/server.c @ 2296:878503b60006
[gaim-migrate @ 2306]
hi
committer: Tailor Script <tailor@pidgin.im>
| author | Eric Warmenhoven <eric@warmenhoven.org> |
|---|---|
| date | Mon, 17 Sep 2001 16:17:21 +0000 |
| parents | 38e156136896 |
| children | a87ca0aa1840 |
comparison
equal
deleted
inserted
replaced
| 2295:24dc9ce95127 | 2296:878503b60006 |
|---|---|
| 900 void serv_got_chat_in(struct gaim_connection *g, int id, char *who, int whisper, char *message, time_t mtime) | 900 void serv_got_chat_in(struct gaim_connection *g, int id, char *who, int whisper, char *message, time_t mtime) |
| 901 { | 901 { |
| 902 int w; | 902 int w; |
| 903 GSList *bcs = g->buddy_chats; | 903 GSList *bcs = g->buddy_chats; |
| 904 struct conversation *b = NULL; | 904 struct conversation *b = NULL; |
| 905 char *buf; | |
| 905 | 906 |
| 906 while (bcs) { | 907 while (bcs) { |
| 907 b = (struct conversation *)bcs->data; | 908 b = (struct conversation *)bcs->data; |
| 908 if (id == b->id) | 909 if (id == b->id) |
| 909 break; | 910 break; |
| 915 return; | 916 return; |
| 916 | 917 |
| 917 if (plugin_event(event_chat_recv, g, b->name, who, message)) | 918 if (plugin_event(event_chat_recv, g, b->name, who, message)) |
| 918 return; | 919 return; |
| 919 | 920 |
| 921 buf = g_malloc(MAX(strlen(message) * 2, 8192)); | |
| 922 strcpy(buf, message); | |
| 923 | |
| 920 if (general_options & OPT_GEN_SEND_LINKS) { | 924 if (general_options & OPT_GEN_SEND_LINKS) { |
| 921 linkify_text(message); | 925 linkify_text(buf); |
| 922 } | 926 } |
| 923 | 927 |
| 924 if (whisper) | 928 if (whisper) |
| 925 w = WFLAG_WHISPER; | 929 w = WFLAG_WHISPER; |
| 926 else | 930 else |
| 927 w = 0; | 931 w = 0; |
| 928 | 932 |
| 929 chat_write(b, who, w, message, mtime); | 933 chat_write(b, who, w, buf, mtime); |
| 934 g_free(buf); | |
| 930 } | 935 } |
| 931 | 936 |
| 932 void send_keepalive(gpointer d) | 937 void send_keepalive(gpointer d) |
| 933 { | 938 { |
| 934 struct gaim_connection *gc = (struct gaim_connection *)d; | 939 struct gaim_connection *gc = (struct gaim_connection *)d; |
