comparison src/server.c @ 1263:f44bcae47188

[gaim-migrate @ 1273] don't double-escape away messages when sent in toc. what the hell was is_idle? committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Thu, 14 Dec 2000 09:35:52 +0000
parents 46c09828e929
children cb84b5c6d9ab
comparison
equal deleted inserted replaced
1262:b0bd82cce5e1 1263:f44bcae47188
295 295
296 296
297 void serv_got_im(struct gaim_connection *gc, char *name, char *message, int away) 297 void serv_got_im(struct gaim_connection *gc, char *name, char *message, int away)
298 { 298 {
299 struct conversation *cnv; 299 struct conversation *cnv;
300 int is_idle = -1;
301 int new_conv = 0; 300 int new_conv = 0;
302 301
303 char *buffy = g_strdup(message); 302 char *buffy = g_strdup(message);
304 char *angel = g_strdup(name); 303 char *angel = g_strdup(name);
305 int plugin_return = plugin_event(event_im_recv, gc, &angel, &buffy, 0); 304 int plugin_return = plugin_event(event_im_recv, gc, &angel, &buffy, 0);
375 if ((cnv == NULL) || (t - cnv->sent_away) < 120) 374 if ((cnv == NULL) || (t - cnv->sent_away) < 120)
376 return; 375 return;
377 376
378 cnv->sent_away = t; 377 cnv->sent_away = t;
379 378
380 if (is_idle)
381 is_idle = -1;
382
383 /* apply default fonts and colors */ 379 /* apply default fonts and colors */
384 tmpmsg = stylize(awaymessage->message, MSG_LEN); 380 tmpmsg = stylize(awaymessage->message, MSG_LEN);
385 381
386 /* PRPL */
387 if (gc->protocol == PROTO_TOC) {
388 escape_text(tmpmsg);
389 escape_message(tmpmsg);
390 }
391 serv_send_im(gc, name, away_subs(tmpmsg, alias), 1); 382 serv_send_im(gc, name, away_subs(tmpmsg, alias), 1);
392 g_free(tmpmsg);
393 tmpmsg = stylize(awaymessage->message, MSG_LEN);
394
395 if (is_idle == -1)
396 is_idle = 1;
397 383
398 if (cnv != NULL) 384 if (cnv != NULL)
399 write_to_conv(cnv, away_subs(tmpmsg, alias), WFLAG_SEND | WFLAG_AUTO, NULL); 385 write_to_conv(cnv, away_subs(tmpmsg, alias), WFLAG_SEND | WFLAG_AUTO, NULL);
400 g_free(tmpmsg); 386 g_free(tmpmsg);
401 } 387 }