Mercurial > pidgin.yaz
comparison src/server.c @ 2231:8c4ff1a368bd
[gaim-migrate @ 2241]
blue:~/gaim/app/src/protocols $ ./gtk
icq: 0
irc: 0
jabber: 52
msn: 0
napster: 0
oscar: 7
toc: 17
yahoo: 0
zephyr: 1
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Fri, 07 Sep 2001 08:09:22 +0000 |
parents | cff4fbe01c7b |
children | 0b5c3338fa3d |
comparison
equal
deleted
inserted
replaced
2230:cfc9abe45db2 | 2231:8c4ff1a368bd |
---|---|
118 update_keepalive(gc, TRUE); | 118 update_keepalive(gc, TRUE); |
119 } | 119 } |
120 | 120 |
121 | 121 |
122 | 122 |
123 int serv_send_im(struct gaim_connection *gc, char *name, char *message, int away) | 123 int serv_send_im(struct gaim_connection *gc, char *name, char *message, int flags) |
124 { | 124 { |
125 int val = -EINVAL; | 125 int val = -EINVAL; |
126 if (gc->prpl && gc->prpl->send_im) | 126 if (gc->prpl && gc->prpl->send_im) |
127 val = (*gc->prpl->send_im)(gc, name, message, away); | 127 val = (*gc->prpl->send_im)(gc, name, message, flags); |
128 | 128 |
129 if (!away) | 129 if (!(flags & IM_FLAG_AWAY)) |
130 serv_touch_idle(gc); | 130 serv_touch_idle(gc); |
131 | 131 |
132 return val; | 132 return val; |
133 } | 133 } |
134 | 134 |
426 * this is one of the biggest hacks I think I've seen. But, in order to be nice to | 426 * this is one of the biggest hacks I think I've seen. But, in order to be nice to |
427 * TiK, we're going to give users the option to ignore it. */ | 427 * TiK, we're going to give users the option to ignore it. */ |
428 if ((general_options & OPT_GEN_TIK_HACK) && gc->away && strlen(gc->away) && | 428 if ((general_options & OPT_GEN_TIK_HACK) && gc->away && strlen(gc->away) && |
429 !strcmp(message, ">>>Automated Message: Getting Away Message<<<")) { | 429 !strcmp(message, ">>>Automated Message: Getting Away Message<<<")) { |
430 char *tmpmsg = stylize(awaymessage->message, MSG_LEN); | 430 char *tmpmsg = stylize(awaymessage->message, MSG_LEN); |
431 serv_send_im(gc, name, tmpmsg, 1); | 431 serv_send_im(gc, name, tmpmsg, IM_FLAG_AWAY); |
432 g_free(tmpmsg); | 432 g_free(tmpmsg); |
433 g_free(name); | 433 g_free(name); |
434 g_free(message); | 434 g_free(message); |
435 return; | 435 return; |
436 } | 436 } |
547 } | 547 } |
548 qar->sent_away = t; | 548 qar->sent_away = t; |
549 | 549 |
550 /* apply default fonts and colors */ | 550 /* apply default fonts and colors */ |
551 tmpmsg = stylize(gc->away, MSG_LEN); | 551 tmpmsg = stylize(gc->away, MSG_LEN); |
552 serv_send_im(gc, name, away_subs(tmpmsg, alias), 1); | 552 serv_send_im(gc, name, away_subs(tmpmsg, alias), IM_FLAG_AWAY); |
553 if (!cnv && clistqueue && (general_options & OPT_GEN_QUEUE_WHEN_AWAY)) { | 553 if (!cnv && clistqueue && (general_options & OPT_GEN_QUEUE_WHEN_AWAY)) { |
554 struct queued_message *qm; | 554 struct queued_message *qm; |
555 qm = g_new0(struct queued_message, 1); | 555 qm = g_new0(struct queued_message, 1); |
556 g_snprintf(qm->name, sizeof(qm->name), "%s", name); | 556 g_snprintf(qm->name, sizeof(qm->name), "%s", name); |
557 qm->message = g_strdup(away_subs(tmpmsg, alias)); | 557 qm->message = g_strdup(away_subs(tmpmsg, alias)); |