Mercurial > pidgin
diff src/protocols/novell/novell.c @ 9268:54fb1f466953
[gaim-migrate @ 10069]
" - Added keepalive support
- Improved handling of character sets in RTF (improves
intl interoperability between Gaim and the
Windows/XPLAT Messenger clients)." --Mike Stoddard of Novell
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Sat, 12 Jun 2004 15:13:29 +0000 |
parents | 7ab20f829190 |
children | 7a8aa87164ae |
line wrap: on
line diff
--- a/src/protocols/novell/novell.c Sat Jun 12 00:00:01 2004 +0000 +++ b/src/protocols/novell/novell.c Sat Jun 12 15:13:29 2004 +0000 @@ -37,8 +37,6 @@ static GaimPlugin *my_protocol = NULL; -static gboolean set_permit = FALSE; - static gboolean _is_disconnect_error(NMERR_T err); @@ -104,7 +102,6 @@ } _sync_contact_list(user); - _sync_privacy_lists(user); /* Tell Gaim that we are connected */ gaim_connection_set_state(gc, GAIM_CONNECTED); @@ -1685,6 +1682,9 @@ GaimConversation *gconv; NMConference *conference; GaimConvImFlags imflags; + char *text = NULL; + + text = g_markup_escape_text(nm_event_get_text(event), -1); conference = nm_event_get_conference(event); if (conference) { @@ -1703,7 +1703,7 @@ serv_got_im(gaim_account_get_connection(user->client_data), nm_user_record_get_display_id(user_record), - nm_event_get_text(event), imflags, + text, imflags, nm_event_get_gmt(event)); gconv = gaim_find_conversation_with_account( @@ -1715,8 +1715,7 @@ if (contact) { gaim_conversation_set_title( - gconv, - nm_contact_get_display_name(contact)); + gconv, nm_contact_get_display_name(contact)); } else { @@ -1759,12 +1758,12 @@ serv_got_chat_in(gaim_account_get_connection(user->client_data), gaim_conv_chat_get_id(GAIM_CONV_CHAT(chat)), - name, - 0, nm_event_get_text(event), - nm_event_get_gmt(event)); + name, 0, text, nm_event_get_gmt(event)); } } } + + g_free(text); } static void @@ -2161,7 +2160,7 @@ return 0; /* Create a new message */ - message = nm_create_message(gaim_markup_strip_html(message_body)); + message = nm_create_message(message_body); /* Need to get the DN for the buddy so we can look up the convo */ dn = nm_lookup_dn(user, name); @@ -2371,7 +2370,7 @@ if (user == NULL) return -1; - message = nm_create_message(gaim_markup_strip_html(text)); + message = nm_create_message(text); for (cnode = user->conferences; cnode != NULL; cnode = cnode->next) { conference = cnode->data; @@ -3083,8 +3082,9 @@ if (user == NULL) return; - if (set_permit == FALSE) { - set_permit = TRUE; + if (user->privacy_synched == FALSE) { + _sync_privacy_lists(user); + user->privacy_synched = TRUE; return; } @@ -3285,7 +3285,7 @@ novell_blist_node_menu(GaimBlistNode *node) { GList *list = NULL; - GaimBlistNodeAction *act; + GaimBlistNodeAction *act; if(GAIM_BLIST_NODE_IS_BUDDY(node)) { act = gaim_blist_node_action_new(_("Initiate _Chat"), @@ -3296,6 +3296,23 @@ return list; } +static void +novell_keepalive(GaimConnection *gc) +{ + NMUser *user; + NMERR_T rc = NM_OK; + + if (gc == NULL) + return; + + user = gc->proto_data; + if (user == NULL) + return; + + rc = nm_send_keepalive(user, NULL, NULL); + _check_for_disconnect(user, rc); +} + static GaimPluginProtocolInfo prpl_info = { GAIM_PRPL_API_VERSION, 0, @@ -3328,12 +3345,12 @@ novell_set_permit_deny, NULL, /* warn */ NULL, /* join_chat */ - NULL, /* reject_chat ?? */ + NULL, /* reject_chat */ novell_chat_invite, /* chat_invite */ novell_chat_leave, NULL, /* chat_whisper */ novell_chat_send, - NULL, /* keepalive */ + novell_keepalive, NULL, /* register_user */ NULL, /* get_cb_info */ NULL, /* get_cb_away_msg */