# HG changeset patch # User Eric Warmenhoven <eric@warmenhoven.org> # Date 989660961 0 # Node ID e739d3dddf4c150d7ae7f390a189da845e5b696b # Parent 9845deede1e9419968c6bd33d515c13bc2dd55a9 [gaim-migrate @ 1855] this is probably bad, huh. committer: Tailor Script <tailor@pidgin.im> diff -r 9845deede1e9 -r e739d3dddf4c plugins/yay/internal.h --- a/plugins/yay/internal.h Sat May 12 08:48:06 2001 +0000 +++ b/plugins/yay/internal.h Sat May 12 09:49:21 2001 +0000 @@ -70,6 +70,8 @@ #define YAHOO_MESSAGE_NORMAL 1 #define YAHOO_MESSAGE_BOUNCE 2 +#define YAHOO_MESSAGE_OFFLINE 5 +#define YAHOO_MESSAGE_SEND 1515563606 void yahoo_storeint(guchar *, guint); int yahoo_makeint(guchar *); diff -r 9845deede1e9 -r e739d3dddf4c plugins/yay/outgoing.c --- a/plugins/yay/outgoing.c Sat May 12 08:48:06 2001 +0000 +++ b/plugins/yay/outgoing.c Sat May 12 09:49:21 2001 +0000 @@ -115,7 +115,7 @@ return 0; ret = yahoo_write_cmd(session, conn, YAHOO_SERVICE_MESSAGE, - active_id ? active_id : session->name, buf, 0); + active_id ? active_id : session->name, buf, YAHOO_MESSAGE_SEND); g_free(buf); return ret; diff -r 9845deede1e9 -r e739d3dddf4c plugins/yay/rxhandlers.c --- a/plugins/yay/rxhandlers.c Sat May 12 08:48:06 2001 +0000 +++ b/plugins/yay/rxhandlers.c Sat May 12 09:49:21 2001 +0000 @@ -208,7 +208,7 @@ { char buf[256]; int type = yahoo_makeint(pkt->msgtype); - char *str_array[3]; + char *str_array[4]; char *tmp; switch(type) { @@ -232,6 +232,32 @@ if (sess->callbacks[YAHOO_HANDLE_BOUNCE].function) (*sess->callbacks[YAHOO_HANDLE_BOUNCE].function)(sess); break; + case YAHOO_MESSAGE_OFFLINE: + tmp = pkt->content; + if ((tmp = strchr(tmp, ',')) == NULL) + break; + ++tmp; + if ((tmp = strchr(tmp, ',')) == NULL) + break; + str_array[0] = ++tmp; + if ((tmp = strchr(tmp, ',')) == NULL) + break; + *tmp++ = '\0'; + str_array[1] = tmp; + if ((tmp = strchr(tmp, ',')) == NULL) + break; + *tmp++ = '\0'; + str_array[2] = tmp; + if ((tmp = strchr(tmp, ',')) == NULL) + break; + *tmp++ = '\0'; + str_array[3] = tmp; + if (sess->callbacks[YAHOO_HANDLE_MESSAGE].function) + (*sess->callbacks[YAHOO_HANDLE_MESSAGE].function)(sess, str_array[0], + str_array[1], + atol(str_array[2]), + str_array[3]); + break; default: g_snprintf(buf, sizeof(buf), "unhandled message type %d", type); YAHOO_PRINT(sess, YAHOO_LOG_WARNING, buf);