comparison src/protocols/zephyr/zephyr.c @ 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 6b7b5b10cd8a
children 832fd9b754d0
comparison
equal deleted inserted replaced
8558:6cf7a9ae3057 8559:1c20aa5bd389
496 } 496 }
497 } 497 }
498 return FALSE; 498 return FALSE;
499 } 499 }
500 500
501 static void message_failed(ZNotice_t notice, struct sockaddr_in from)
502 {
503 if (g_ascii_strcasecmp(notice.z_class,"message")) {
504 /* message to chat failed ignore for now */
505 } else {
506 gaim_notify_error(zgc,notice.z_recipient,_("User is offline"),NULL);
507 }
508 }
509
501 static void handle_message(ZNotice_t notice, struct sockaddr_in from) 510 static void handle_message(ZNotice_t notice, struct sockaddr_in from)
502 { 511 {
503 if (!g_ascii_strcasecmp(notice.z_class, LOGIN_CLASS)) { 512 if (!g_ascii_strcasecmp(notice.z_class, LOGIN_CLASS)) {
504 /* well, we'll be updating in 20 seconds anyway, might as well ignore this. */ 513 /* well, we'll be updating in 20 seconds anyway, might as well ignore this. */
505 } else if (!g_ascii_strcasecmp(notice.z_class, LOCATE_CLASS)) { 514 } else if (!g_ascii_strcasecmp(notice.z_class, LOCATE_CLASS)) {
641 case UNSAFE: 650 case UNSAFE:
642 case UNACKED: 651 case UNACKED:
643 case ACKED: 652 case ACKED:
644 handle_message(notice, from); 653 handle_message(notice, from);
645 break; 654 break;
655 case SERVACK:
656 if(!(g_ascii_strcasecmp(notice.z_message,ZSRVACK_NOTSENT))){
657 message_failed(notice,from);
658 }
659 break;
646 default: 660 default:
647 /* we'll just ignore things for now */ 661 /* we'll just ignore things for now */
648 gaim_debug(GAIM_DEBUG_WARNING, "zephyr", "Unhandled notice.\n"); 662 gaim_debug(GAIM_DEBUG_WARNING, "zephyr", "Unhandled notice.\n");
649 break; 663 break;
650 } 664 }