diff plugins/yay/outgoing.c @ 2009:ac9dd6b00b34

[gaim-migrate @ 2019] different way of specifying offline messages. Jeremy, I'm just about to look at your patch committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Wed, 13 Jun 2001 21:28:03 +0000
parents f7114b4d1f96
children
line wrap: on
line diff
--- a/plugins/yay/outgoing.c	Wed Jun 13 07:26:16 2001 +0000
+++ b/plugins/yay/outgoing.c	Wed Jun 13 21:28:03 2001 +0000
@@ -115,6 +115,29 @@
 		return 0;
 
 	ret = yahoo_write_cmd(session, conn, YAHOO_SERVICE_MESSAGE,
+			active_id ? active_id : session->name, buf, 0);
+	g_free(buf);
+
+	return ret;
+}
+
+int yahoo_send_message_offline(struct yahoo_session *session, const char *active_id,
+		const char *user, const char *msg)
+{
+	struct yahoo_conn *conn;
+	char *buf;
+	int ret;
+
+	if (!session || !user || !msg)
+		return 0;
+
+	if (!(conn = yahoo_getconn_type(session, YAHOO_CONN_TYPE_MAIN)))
+		return 0;
+
+	if (!(buf = g_strconcat(user, ",", msg, NULL)))
+		return 0;
+
+	ret = yahoo_write_cmd(session, conn, YAHOO_SERVICE_MESSAGE,
 			active_id ? active_id : session->name, buf, YAHOO_MESSAGE_SEND);
 	g_free(buf);