| 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 } |