Mercurial > pidgin
comparison src/server.c @ 101:a9aa982272f9
[gaim-migrate @ 111]
Heh, this is a good thing to fix. Before, if you send an IM, you can change
it going out, but on your converation window, it would look unchanged. Now,
if a plugin changes the outgoing text, the conversation window displays the
new text.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Sun, 09 Apr 2000 23:03:44 +0000 |
parents | 9f6ce50ffb78 |
children | 890cfb7d8fdb |
comparison
equal
deleted
inserted
replaced
100:da0883dfa7db | 101:a9aa982272f9 |
---|---|
136 | 136 |
137 void serv_send_im(char *name, char *message, int away) | 137 void serv_send_im(char *name, char *message, int away) |
138 { | 138 { |
139 char buf[MSG_LEN - 7]; | 139 char buf[MSG_LEN - 7]; |
140 | 140 |
141 #ifdef GAIM_PLUGINS | |
142 GList *c = callbacks; | |
143 struct gaim_callback *g; | |
144 void (*function)(char **, char **, void *); | |
145 while (c) { | |
146 g = (struct gaim_callback *)c->data; | |
147 if (g->event == event_im_send && g->function != NULL) { | |
148 function = g->function; | |
149 /* I can guarantee you this is wrong */ | |
150 (*function)(&name, &message, g->data); | |
151 } | |
152 c = c->next; | |
153 } | |
154 /* make sure no evil plugin is trying to crash gaim */ | |
155 if (message == NULL) | |
156 return; | |
157 #endif | |
158 | |
159 #ifndef USE_OSCAR | 141 #ifndef USE_OSCAR |
160 g_snprintf(buf, MSG_LEN - 8, "toc_send_im %s \"%s\"%s", normalize(name), | 142 g_snprintf(buf, MSG_LEN - 8, "toc_send_im %s \"%s\"%s", normalize(name), |
161 message, ((away) ? " auto" : "")); | 143 message, ((away) ? " auto" : "")); |
162 sflap_send(buf, strlen(buf), TYPE_DATA); | 144 sflap_send(buf, strlen(buf), TYPE_DATA); |
163 #else | 145 #else |