| 72 purple_debug(PURPLE_DEBUG_ERROR, "irc", "got MOTD request for NULL gc\n"); |
72 purple_debug(PURPLE_DEBUG_ERROR, "irc", "got MOTD request for NULL gc\n"); |
| 73 return; |
73 return; |
| 74 } |
74 } |
| 75 irc = purple_connection_get_protocol_data(gc); |
75 irc = purple_connection_get_protocol_data(gc); |
| 76 if (irc->motd == NULL) { |
76 if (irc->motd == NULL) { |
| 77 purple_notify_error(gc, _("Error displaying MOTD"), _("No MOTD available"), |
77 purple_notify_error(gc, _("Error displaying MOTD"), |
| 78 _("There is no MOTD associated with this connection.")); |
78 _("No MOTD available"), |
| |
79 _("There is no MOTD associated with this connection."), |
| |
80 purple_request_cpar_from_connection(gc)); |
| 79 return; |
81 return; |
| 80 } |
82 } |
| 81 title = g_strdup_printf(_("MOTD for %s"), irc->server); |
83 title = g_strdup_printf(_("MOTD for %s"), irc->server); |
| 82 purple_notify_formatted(gc, title, title, NULL, irc->motd->str, NULL, NULL); |
84 purple_notify_formatted(gc, title, title, NULL, irc->motd->str, NULL, NULL); |
| 83 g_free(title); |
85 g_free(title); |