/* Notify plugins, etc */ void on_login_success(struct hub_info* hub, struct hub_user* u) { /* Send user list of all existing users */ if (!uman_send_user_list(hub, hub->users, u)) return; /* Mark as being in the normal state, and add user to the user list */ user_set_state(u, state_normal); uman_add(hub->users, u); /* Announce new user to all connected users */ if (user_is_logged_in(u)) route_info_message(hub, u); plugin_log_user_login_success(hub, u); /* reset timeout */ net_con_clear_timeout(u->connection); }
/* Notify plugins, etc */ void on_login_success(struct hub_info* hub, struct hub_user* u) { /* Send user list of all existing users */ if (!uman_send_user_list(hub, hub->users, u)) return; /* Mark as being in the normal state, and add user to the user list */ user_set_state(u, state_normal); uman_add(hub->users, u); // Make operators receive hub notifications by default. if (user_is_protected(u)) user_flag_set(u, flag_opnotify); /* Announce new user to all connected users */ if (user_is_logged_in(u)) route_info_message(hub, u); plugin_log_user_login_success(hub, u); /* reset timeout */ net_con_clear_timeout(u->connection); }