changeset 8559:1c20aa5bd389

[gaim-migrate @ 9303] " This patch calls gaim_notify_error() if the recipient of a zephyr wasn't online. I wasn't sure whether this breaks string freeze (since it adds another occurrence of an already extant translateable string), but I suppose I could ask you again once 0.76 is released." --Arun A Tharuvai committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Fri, 02 Apr 2004 06:05:05 +0000
parents 6cf7a9ae3057
children 832fd9b754d0
files src/protocols/zephyr/zephyr.c
diffstat 1 files changed, 14 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/zephyr/zephyr.c	Fri Apr 02 06:04:08 2004 +0000
+++ b/src/protocols/zephyr/zephyr.c	Fri Apr 02 06:05:05 2004 +0000
@@ -498,6 +498,15 @@
 	return FALSE;
 }
 
+static void message_failed(ZNotice_t notice, struct sockaddr_in from)
+{
+        if (g_ascii_strcasecmp(notice.z_class,"message")) {
+                /* message to chat failed ignore for now */
+        } else {
+                gaim_notify_error(zgc,notice.z_recipient,_("User is offline"),NULL);
+        }
+}
+
 static void handle_message(ZNotice_t notice, struct sockaddr_in from)
 {
 	if (!g_ascii_strcasecmp(notice.z_class, LOGIN_CLASS)) {
@@ -643,6 +652,11 @@
 		case ACKED:
 			handle_message(notice, from);
 			break;
+               case SERVACK:
+                        if(!(g_ascii_strcasecmp(notice.z_message,ZSRVACK_NOTSENT))){
+                                message_failed(notice,from);
+                        }
+                        break;
 		default:
 			/* we'll just ignore things for now */
 			gaim_debug(GAIM_DEBUG_WARNING, "zephyr", "Unhandled notice.\n");