Mercurial > pidgin.yaz
comparison src/protocols/yahoo/yahoo.c @ 2772:f9227268db25
[gaim-migrate @ 2785]
isback?
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Mon, 19 Nov 2001 23:32:04 +0000 |
parents | 450f4f9d2f23 |
children | 318f846120e2 |
comparison
equal
deleted
inserted
replaced
2771:450f4f9d2f23 | 2772:f9227268db25 |
---|---|
965 | 965 |
966 static void yahoo_set_away(struct gaim_connection *gc, char *state, char *msg) | 966 static void yahoo_set_away(struct gaim_connection *gc, char *state, char *msg) |
967 { | 967 { |
968 struct yahoo_data *yd = (struct yahoo_data *)gc->proto_data; | 968 struct yahoo_data *yd = (struct yahoo_data *)gc->proto_data; |
969 struct yahoo_packet *pkt; | 969 struct yahoo_packet *pkt; |
970 int service; | |
970 char s[4]; | 971 char s[4]; |
971 | 972 |
972 gc->away = NULL; | 973 gc->away = NULL; |
973 | 974 |
974 if (msg) { | 975 if (msg) { |
1011 yd->current_status = YAHOO_STATUS_IDLE; | 1012 yd->current_status = YAHOO_STATUS_IDLE; |
1012 } else { | 1013 } else { |
1013 yd->current_status = YAHOO_STATUS_AVAILABLE; | 1014 yd->current_status = YAHOO_STATUS_AVAILABLE; |
1014 } | 1015 } |
1015 | 1016 |
1016 pkt = yahoo_packet_new(YAHOO_SERVICE_ISAWAY, yd->current_status, 0); | 1017 if (yd->current_status == YAHOO_STATUS_AVAILABLE) |
1018 service = YAHOO_SERVICE_ISBACK; | |
1019 else | |
1020 service = YAHOO_SERVICE_ISAWAY; | |
1021 pkt = yahoo_packet_new(service, yd->current_status, 0); | |
1017 g_snprintf(s, sizeof(s), "%d", yd->current_status); | 1022 g_snprintf(s, sizeof(s), "%d", yd->current_status); |
1018 yahoo_packet_hash(pkt, 10, s); | 1023 yahoo_packet_hash(pkt, 10, s); |
1019 if (yd->current_status == YAHOO_STATUS_CUSTOM) | 1024 if (yd->current_status == YAHOO_STATUS_CUSTOM) |
1020 yahoo_packet_hash(pkt, 19, msg); | 1025 yahoo_packet_hash(pkt, 19, msg); |
1021 | 1026 |