Mercurial > pidgin
comparison src/server.c @ 12677:f5c72fd691ee
[gaim-migrate @ 15020]
Move the away %n %d %t substitution code out of server.c and into oscar.c
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Thu, 29 Dec 2005 19:36:59 +0000 |
parents | 4c7e5eb7c09d |
children | eda1572c788b |
comparison
equal
deleted
inserted
replaced
12676:87e95b8ce60b | 12677:f5c72fd691ee |
---|---|
497 * things we have to do for each. | 497 * things we have to do for each. |
498 */ | 498 */ |
499 if (!gaim_presence_is_available(presence)) | 499 if (!gaim_presence_is_available(presence)) |
500 { | 500 { |
501 time_t t = time(NULL); | 501 time_t t = time(NULL); |
502 GaimBuddy *b = gaim_find_buddy(gc->account, name); | |
503 const char *alias = b ? gaim_buddy_get_alias(b) : name; | |
504 struct last_auto_response *lar; | 502 struct last_auto_response *lar; |
505 const gchar *auto_reply_pref; | 503 const gchar *auto_reply_pref; |
506 const char *away_msg; | 504 const char *away_msg; |
507 | 505 |
508 if (cnv == NULL) | 506 if (cnv == NULL) |
557 gaim_status_get_attr_value(status, "message")); | 555 gaim_status_get_attr_value(status, "message")); |
558 | 556 |
559 if ((away_msg == NULL) || (*away_msg == '\0')) | 557 if ((away_msg == NULL) || (*away_msg == '\0')) |
560 return; | 558 return; |
561 | 559 |
562 /* Move this to oscar.c! */ | 560 serv_send_im(gc, name, away_msg, GAIM_MESSAGE_AUTO_RESP); |
563 buffy = gaim_str_sub_away_formatters(away_msg, alias); | 561 |
564 serv_send_im(gc, name, buffy, GAIM_MESSAGE_AUTO_RESP); | 562 gaim_conv_im_write(GAIM_CONV_IM(cnv), NULL, away_msg, |
565 | |
566 gaim_conv_im_write(GAIM_CONV_IM(cnv), NULL, buffy, | |
567 GAIM_MESSAGE_SEND | GAIM_MESSAGE_AUTO_RESP, | 563 GAIM_MESSAGE_SEND | GAIM_MESSAGE_AUTO_RESP, |
568 mtime); | 564 mtime); |
569 | |
570 g_free(buffy); | |
571 } | 565 } |
572 else | 566 else |
573 { | 567 { |
574 /* | 568 /* |
575 * We're not away. This is easy. If the convo window doesn't | 569 * We're not away. This is easy. If the convo window doesn't |