void inbound_quit (server * serv, char *nick, char *ip, char *reason) { GSList *list = sess_list; session *sess; int was_on_front_session = FALSE; while (list) { sess = (session *) list->data; if (sess->server == serv) { if (sess == current_sess) was_on_front_session = TRUE; if (userlist_remove (sess, nick)) { EMIT_SIGNAL (XP_TE_QUIT, sess, nick, reason, ip, NULL, 0); } else if (sess->type == SESS_DIALOG && !serv->p_cmp (sess->channel, nick)) { EMIT_SIGNAL (XP_TE_QUIT, sess, nick, reason, ip, NULL, 0); } } list = list->next; } notify_set_offline (serv, nick, was_on_front_session); }
static void CALLBACK userlist_remove_unreplied_cb( HWND hWnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime) { struct userlist_remove_unreplied_info_struct info; int i; char * r_nickname; ASSERT_RETURNIFFAIL(VALIDPTR(s_userlistHash)); /* perform enumeration to find the unreplied ones */ info.dead_keys = malloc( sizeof(void*) * hashtable_count(s_userlistHash)); info.dead_key_count = 0; hashtable_enumerate( s_userlistHash, userlist_remove_unreplied_enum_fn, (void*)&info); /* quietly remove those dead */ for(i = 0; i < info.dead_key_count; i++) { userlist_remove(info.dead_keys[i], 0); free(info.dead_keys[i]); } /* free leftovers */ free(info.dead_keys); /* send another user refresh list request to the network */ r_nickname = util_utf2vqp(user_codepage(), user_nickname()); msgloop_send(vqp_msg_refresh_req(s_vqpLink, r_nickname, user_codepage()), 0); free(r_nickname); }
void inbound_kick (server *serv, char *chan, char *user, char *kicker, char *reason) { session *sess = find_channel (serv, chan); if (sess) { EMIT_SIGNAL (XP_TE_KICK, sess, kicker, user, chan, reason, 0); userlist_remove (sess, user); } }
void inbound_kick (server *serv, char *chan, char *user, char *kicker, char *reason, const message_tags_data *tags_data) { session *sess = find_channel (serv, chan); if (sess) { EMIT_SIGNAL_TIMESTAMP (XP_TE_KICK, sess, tags_data->timestamp, kicker, user, chan, reason); userlist_remove (sess, user); } }
void inbound_part (server *serv, char *chan, char *user, char *ip, char *reason) { session *sess = find_channel (serv, chan); if (sess) { if (*reason) EMIT_SIGNAL (XP_TE_PARTREASON, sess, user, ip, chan, reason, 0); else EMIT_SIGNAL (XP_TE_PART, sess, user, ip, chan, NULL, 0); userlist_remove (sess, user); } }
void inbound_part (server *serv, char *chan, char *user, char *ip, char *reason, const message_tags_data *tags_data) { session *sess = find_channel (serv, chan); if (sess) { if (*reason) EMIT_SIGNAL_TIMESTAMP (XP_TE_PARTREASON, sess, tags_data->timestamp, user, ip, chan, reason); else EMIT_SIGNAL_TIMESTAMP (XP_TE_PART, sess, tags_data->timestamp, user, ip, chan); userlist_remove (sess, user); } }