Mercurial > pidgin
comparison src/server.c @ 3033:1143524a2eaf
[gaim-migrate @ 3046]
Laying the ground work for image send. Also an IRC fix.
committer: Tailor Script <tailor@pidgin.im>
| author | Sean Egan <seanegan@gmail.com> |
|---|---|
| date | Tue, 12 Mar 2002 17:21:46 +0000 |
| parents | 8851d33517e9 |
| children | 4f2f12bf4408 |
comparison
equal
deleted
inserted
replaced
| 3032:d3536105d581 | 3033:1143524a2eaf |
|---|---|
| 150 if (g && g->prpl && g->prpl->send_typing) | 150 if (g && g->prpl && g->prpl->send_typing) |
| 151 return g->prpl->send_typing(g, name, typing); | 151 return g->prpl->send_typing(g, name, typing); |
| 152 else return 0; | 152 else return 0; |
| 153 } | 153 } |
| 154 | 154 |
| 155 int serv_send_im(struct gaim_connection *gc, char *name, char *message, int flags) | 155 int serv_send_im(struct gaim_connection *gc, char *name, char *message, int len, int flags) |
| 156 { | 156 { |
| 157 int val = -EINVAL; | 157 int val = -EINVAL; |
| 158 if (gc->prpl && gc->prpl->send_im) | 158 if (gc->prpl && gc->prpl->send_im) |
| 159 val = gc->prpl->send_im(gc, name, message, flags); | 159 val = gc->prpl->send_im(gc, name, message, len, flags); |
| 160 | 160 |
| 161 if (!(flags & IM_FLAG_AWAY)) | 161 if (!(flags & IM_FLAG_AWAY)) |
| 162 serv_touch_idle(gc); | 162 serv_touch_idle(gc); |
| 163 | 163 |
| 164 serv_send_typing(gc, name, FALSE); | 164 serv_send_typing(gc, name, FALSE); |
| 492 * this is one of the biggest hacks I think I've seen. But, in order to be nice to | 492 * this is one of the biggest hacks I think I've seen. But, in order to be nice to |
| 493 * TiK, we're going to give users the option to ignore it. */ | 493 * TiK, we're going to give users the option to ignore it. */ |
| 494 if ((away_options & OPT_AWAY_TIK_HACK) && gc->away && strlen(gc->away) && (len < 0) && | 494 if ((away_options & OPT_AWAY_TIK_HACK) && gc->away && strlen(gc->away) && (len < 0) && |
| 495 !strcmp(message, ">>>Automated Message: Getting Away Message<<<")) { | 495 !strcmp(message, ">>>Automated Message: Getting Away Message<<<")) { |
| 496 char *tmpmsg = stylize(awaymessage->message, MSG_LEN); | 496 char *tmpmsg = stylize(awaymessage->message, MSG_LEN); |
| 497 serv_send_im(gc, name, tmpmsg, IM_FLAG_AWAY); | 497 serv_send_im(gc, name, tmpmsg, -1, IM_FLAG_AWAY); |
| 498 g_free(tmpmsg); | 498 g_free(tmpmsg); |
| 499 g_free(name); | 499 g_free(name); |
| 500 g_free(message); | 500 g_free(message); |
| 501 return; | 501 return; |
| 502 } | 502 } |
| 619 } | 619 } |
| 620 qar->sent_away = t; | 620 qar->sent_away = t; |
| 621 | 621 |
| 622 /* apply default fonts and colors */ | 622 /* apply default fonts and colors */ |
| 623 tmpmsg = stylize(gc->away, MSG_LEN); | 623 tmpmsg = stylize(gc->away, MSG_LEN); |
| 624 serv_send_im(gc, name, away_subs(tmpmsg, alias), IM_FLAG_AWAY); | 624 serv_send_im(gc, name, away_subs(tmpmsg, alias), -1, IM_FLAG_AWAY); |
| 625 if (!cnv && clistqueue && (away_options & OPT_AWAY_QUEUE)) { | 625 if (!cnv && clistqueue && (away_options & OPT_AWAY_QUEUE)) { |
| 626 struct queued_message *qm; | 626 struct queued_message *qm; |
| 627 qm = g_new0(struct queued_message, 1); | 627 qm = g_new0(struct queued_message, 1); |
| 628 g_snprintf(qm->name, sizeof(qm->name), "%s", name); | 628 g_snprintf(qm->name, sizeof(qm->name), "%s", name); |
| 629 qm->message = g_strdup(away_subs(tmpmsg, alias)); | 629 qm->message = g_strdup(away_subs(tmpmsg, alias)); |
