diff options
Diffstat (limited to 'src/xmpp/presence.c')
-rw-r--r-- | src/xmpp/presence.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/xmpp/presence.c b/src/xmpp/presence.c index 403ddc4e..123717cc 100644 --- a/src/xmpp/presence.c +++ b/src/xmpp/presence.c @@ -372,7 +372,7 @@ _presence_error_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza, } log_info("Error joining room: %s, reason: %s", fulljid->barejid, error_cond); - srv_room_join_error(fulljid->barejid, error_cond); + sv_ev_room_join_error(fulljid->barejid, error_cond); jid_destroy(fulljid); return 1; } @@ -400,7 +400,7 @@ _presence_error_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza, g_string_free(log_msg, TRUE); - srv_presence_error(from, type, err_msg); + sv_ev_presence_error(from, type, err_msg); free(err_msg); @@ -416,7 +416,7 @@ _unsubscribed_handler(xmpp_conn_t * const conn, Jid *from_jid = jid_create(from); log_debug("Unsubscribed presence handler fired for %s", from); - srv_subscription(from_jid->barejid, PRESENCE_UNSUBSCRIBED); + sv_ev_subscription(from_jid->barejid, PRESENCE_UNSUBSCRIBED); autocomplete_remove(sub_requests_ac, from_jid->barejid); jid_destroy(from_jid); @@ -432,7 +432,7 @@ _subscribed_handler(xmpp_conn_t * const conn, Jid *from_jid = jid_create(from); log_debug("Subscribed presence handler fired for %s", from); - srv_subscription(from_jid->barejid, PRESENCE_SUBSCRIBED); + sv_ev_subscription(from_jid->barejid, PRESENCE_SUBSCRIBED); autocomplete_remove(sub_requests_ac, from_jid->barejid); jid_destroy(from_jid); @@ -452,7 +452,7 @@ _subscribe_handler(xmpp_conn_t * const conn, return 1; } - srv_subscription(from_jid->barejid, PRESENCE_SUBSCRIBE); + sv_ev_subscription(from_jid->barejid, PRESENCE_SUBSCRIBE); autocomplete_add(sub_requests_ac, from_jid->barejid); jid_destroy(from_jid); @@ -480,11 +480,11 @@ _unavailable_handler(xmpp_conn_t * const conn, if (strcmp(my_jid->barejid, from_jid->barejid) !=0) { if (from_jid->resourcepart != NULL) { - srv_contact_offline(from_jid->barejid, from_jid->resourcepart, status_str); + sv_ev_contact_offline(from_jid->barejid, from_jid->resourcepart, status_str); // hack for servers that do not send full jid with unavailable presence } else { - srv_contact_offline(from_jid->barejid, "__prof_default", status_str); + sv_ev_contact_offline(from_jid->barejid, "__prof_default", status_str); } } else { if (from_jid->resourcepart != NULL) { @@ -596,7 +596,7 @@ _available_handler(xmpp_conn_t * const conn, if (g_strcmp0(xmpp_presence->jid->barejid, my_jid->barejid) == 0) { connection_add_available_resource(resource); } else { - srv_contact_online(xmpp_presence->jid->barejid, resource, xmpp_presence->last_activity); + sv_ev_contact_online(xmpp_presence->jid->barejid, resource, xmpp_presence->last_activity); } jid_destroy(my_jid); @@ -682,7 +682,7 @@ _muc_user_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza, void * char *new_jid = stanza_get_muc_destroy_alternative_room(stanza); char *password = stanza_get_muc_destroy_alternative_password(stanza); char *reason = stanza_get_muc_destroy_reason(stanza); - srv_room_destroyed(room, new_jid, password, reason); + sv_ev_room_destroyed(room, new_jid, password, reason); free(password); free(reason); @@ -690,19 +690,19 @@ _muc_user_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza, void * } else if (g_slist_find_custom(status_codes, "307", (GCompareFunc)g_strcmp0) != NULL) { char *actor = stanza_get_actor(stanza); char *reason = stanza_get_reason(stanza); - srv_room_kicked(room, actor, reason); + sv_ev_room_kicked(room, actor, reason); free(reason); // banned from room } else if (g_slist_find_custom(status_codes, "301", (GCompareFunc)g_strcmp0) != NULL) { char *actor = stanza_get_actor(stanza); char *reason = stanza_get_reason(stanza); - srv_room_banned(room, actor, reason); + sv_ev_room_banned(room, actor, reason); free(reason); // normal exit } else { - srv_leave_room(room); + sv_ev_leave_room(room); } g_slist_free_full(status_codes, free); @@ -713,7 +713,7 @@ _muc_user_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza, void * gboolean config_required = stanza_muc_requires_config(stanza); char *actor = stanza_get_actor(stanza); char *reason = stanza_get_reason(stanza); - srv_muc_self_online(room, nick, config_required, role, affiliation, actor, reason, jid, show_str, status_str); + sv_ev_muc_self_online(room, nick, config_required, role, affiliation, actor, reason, jid, show_str, status_str); } // handle presence from room members @@ -735,19 +735,19 @@ _muc_user_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza, void * if (g_slist_find_custom(status_codes, "307", (GCompareFunc)g_strcmp0) != NULL) { char *actor = stanza_get_actor(stanza); char *reason = stanza_get_reason(stanza); - srv_room_occupent_kicked(room, nick, actor, reason); + sv_ev_room_occupent_kicked(room, nick, actor, reason); free(reason); // banned from room } else if (g_slist_find_custom(status_codes, "301", (GCompareFunc)g_strcmp0) != NULL) { char *actor = stanza_get_actor(stanza); char *reason = stanza_get_reason(stanza); - srv_room_occupent_banned(room, nick, actor, reason); + sv_ev_room_occupent_banned(room, nick, actor, reason); free(reason); // normal exit } else { - srv_room_occupant_offline(room, nick, "offline", status_str); + sv_ev_room_occupant_offline(room, nick, "offline", status_str); } g_slist_free_full(status_codes, free); @@ -765,7 +765,7 @@ _muc_user_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza, void * char *actor = stanza_get_actor(stanza); char *reason = stanza_get_reason(stanza); - srv_muc_occupant_online(room, nick, jid, role, affiliation, actor, reason, show_str, status_str); + sv_ev_muc_occupant_online(room, nick, jid, role, affiliation, actor, reason, show_str, status_str); } } |