static void h_hdl_umode_changed(hook_data_umode_changed *hdata);
static void h_hdl_whois(hook_data_client *hdata);
static void recurse_client_exit(struct Client *client_p);
static void h_hdl_umode_changed(hook_data_umode_changed *hdata);
static void h_hdl_whois(hook_data_client *hdata);
static void recurse_client_exit(struct Client *client_p);
static void mo_dehelper(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
static void me_dehelper(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
static void do_dehelper(struct Client *source_p, struct Client *target_p);
static void mo_dehelper(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
static void me_dehelper(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
static void do_dehelper(struct Client *source_p, struct Client *target_p);
- sendto_one(source_p, form_str(ERR_NOPRIVS), me.name, source_p->name, "admin");
+ sendto_one(source_p, form_str(ERR_NOPRIVS), me.name, source_p->name, "dehelper");
return;
sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "%s is using DEHELPER on %s",
return;
sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "%s is using DEHELPER on %s",
+static void
+helper_add(struct Client *client_p)
+{
+ if (rb_dlinkFind(client_p, &helper_list) != NULL)
+ return;
+
+ rb_dlinkAddAlloc(client_p, &helper_list);
+}
+
+static void
+helper_delete(struct Client *client_p)
+{
+ rb_dlinkFindDestroy(client_p, &helper_list);
+}
+
- if (client_p->umodes & UMODE_HELPOPS)
- rb_dlinkFindDestroy(client_p, &helper_list);
+ if (client_p->umodes & user_modes[UMODECHAR_HELPOPS])
+ helper_delete(client_p);
struct Client *source_p = hdata->client;
/* didn't change +H umode, we don't need to do anything */
struct Client *source_p = hdata->client;
/* didn't change +H umode, we don't need to do anything */
sendto_one(source_p, form_str(ERR_NOPRIVS), me.name, source_p->name, "usermode:helpops");
sendto_one(source_p, form_str(ERR_NOPRIVS), me.name, source_p->name, "usermode:helpops");
{
sendto_one_numeric(source_p, RPL_WHOISHELPOP, form_str(RPL_WHOISHELPOP), target_p->name);
}
{
sendto_one_numeric(source_p, RPL_WHOISHELPOP, form_str(RPL_WHOISHELPOP), target_p->name);
}