comparison src/server.c @ 3815:b2ec492c9afe

[gaim-migrate @ 3962] Thanks Joshua Blanton. The ChangeLog is getting REALLY huge. Remember when Gaim used to have "releases"? committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Tue, 29 Oct 2002 05:57:55 +0000
parents 2567aabdf624
children 30f52e7afd1d
comparison
equal deleted inserted replaced
3814:c56115a38aa0 3815:b2ec492c9afe
180 if (g && g->prpl && g->prpl->send_typing) 180 if (g && g->prpl && g->prpl->send_typing)
181 return g->prpl->send_typing(g, name, typing); 181 return g->prpl->send_typing(g, name, typing);
182 else return 0; 182 else return 0;
183 } 183 }
184 184
185 struct queued_away_response {
186 char name[80];
187 time_t sent_away;
188 };
189
190 struct queued_away_response *find_queued_away_response_by_name(char *name);
191
185 int serv_send_im(struct gaim_connection *gc, char *name, char *message, int len, int flags) 192 int serv_send_im(struct gaim_connection *gc, char *name, char *message, int len, int flags)
186 { 193 {
187 int val = -EINVAL; 194 int val = -EINVAL;
188 struct conversation *cnv = find_conversation(name); 195 struct conversation *cnv = find_conversation(name);
189 if (gc->prpl && gc->prpl->send_im) 196 if (gc->prpl && gc->prpl->send_im)
190 val = gc->prpl->send_im(gc, name, message, len, flags); 197 val = gc->prpl->send_im(gc, name, message, len, flags);
191 198
192 if (!(flags & IM_FLAG_AWAY)) 199 if (!(flags & IM_FLAG_AWAY))
193 serv_touch_idle(gc); 200 serv_touch_idle(gc);
201
202 if (gc->away && away_options & OPT_AWAY_DELAY_IN_USE &&
203 !(away_options & OPT_AWAY_NO_AUTO_RESP)) {
204 time_t t;
205 struct queued_away_response *qar;
206 time(&t);
207 qar = find_queued_away_response_by_name(name);
208 if (!qar) {
209 qar = (struct queued_away_response *)g_new0(struct queued_away_response, 1);
210 g_snprintf(qar->name, sizeof(qar->name), "%s", name);
211 qar->sent_away = 0;
212 away_time_queue = g_slist_append(away_time_queue, qar);
213 }
214 qar->sent_away = t;
215 }
194 216
195 if (cnv && cnv->type_again_timeout) 217 if (cnv && cnv->type_again_timeout)
196 gtk_timeout_remove(cnv->type_again_timeout); 218 gtk_timeout_remove(cnv->type_again_timeout);
197 219
198 return val; 220 return val;
497 templist = templist->next; 519 templist = templist->next;
498 } 520 }
499 521
500 return i; 522 return i;
501 } 523 }
502
503 struct queued_away_response {
504 char name[80];
505 time_t sent_away;
506 };
507 524
508 struct queued_away_response *find_queued_away_response_by_name(char *name) 525 struct queued_away_response *find_queued_away_response_by_name(char *name)
509 { 526 {
510 GSList *templist; 527 GSList *templist;
511 struct queued_away_response *qar; 528 struct queued_away_response *qar;