- if (client_p->umodes & UMODE_HELPOPS)
- rb_dlinkAddAlloc(client_p, &helper_list);
+ if (client_p->umodes & user_modes[UMODECHAR_HELPOPS])
+ helper_add(client_p);
+}
+
+static void
+recurse_client_exit(struct Client *client_p)
+{
+ if (IsPerson(client_p))
+ {
+ if (client_p->umodes & user_modes[UMODECHAR_HELPOPS])
+ helper_delete(client_p);
+ }
+ else if (IsServer(client_p))
+ {
+ rb_dlink_node *nptr;
+
+ RB_DLINK_FOREACH(nptr, client_p->serv->users.head)
+ recurse_client_exit(nptr->data);
+
+ RB_DLINK_FOREACH(nptr, client_p->serv->servers.head)
+ recurse_client_exit(nptr->data);
+ }