]>
Commit | Line | Data |
---|---|---|
6dc16f7e JT |
1 | /* |
2 | * Disable LOCOPS (by disallowing any local user setting +l). | |
3 | * -- jilles | |
4 | */ | |
5 | ||
6 | #include "stdinc.h" | |
7 | #include "modules.h" | |
8 | #include "client.h" | |
9 | #include "hook.h" | |
10 | #include "ircd.h" | |
11 | #include "send.h" | |
12 | #include "s_conf.h" | |
13 | #include "s_newconf.h" | |
14 | ||
15 | static void h_nl_umode_changed(hook_data_umode_changed *); | |
16 | ||
17 | mapi_hfn_list_av1 nl_hfnlist[] = { | |
18 | { "umode_changed", (hookfn) h_nl_umode_changed }, | |
19 | { NULL, NULL } | |
20 | }; | |
21 | ||
04f832b7 | 22 | DECLARE_MODULE_AV2(no_locops, NULL, NULL, NULL, NULL, nl_hfnlist, NULL, NULL, NULL); |
6dc16f7e JT |
23 | |
24 | static void | |
25 | h_nl_umode_changed(hook_data_umode_changed *hdata) | |
26 | { | |
27 | struct Client *source_p = hdata->client; | |
28 | ||
29 | if (MyClient(source_p) && source_p->umodes & UMODE_LOCOPS) | |
30 | { | |
31 | source_p->umodes &= ~UMODE_LOCOPS; | |
32 | } | |
33 | } |