2 * Deny user to remove +i flag except they are irc operators
4 * Based off no_oper_invis.c by jilles
6 * Note that +i must be included in default_umodes
16 #include "s_newconf.h"
18 static const char noi_desc
[] =
19 "Do not allow users to remove user mode +i unless they are operators";
21 static void h_noi_umode_changed(hook_data_umode_changed
*);
23 mapi_hfn_list_av1 noi_hfnlist
[] = {
24 { "umode_changed", (hookfn
) h_noi_umode_changed
},
28 DECLARE_MODULE_AV2(force_user_invis
, NULL
, NULL
, NULL
, NULL
, noi_hfnlist
, NULL
, NULL
, noi_desc
);
31 h_noi_umode_changed(hook_data_umode_changed
*hdata
)
33 struct Client
*source_p
= hdata
->client
;
35 if (MyClient(source_p
) && !IsOper(source_p
) && !IsInvisible(source_p
)) {
36 SetInvisible(source_p
);