]> jfr.im git - solanum.git/blame - extensions/no_locops.c
extensions/extb_ssl.c: make certfp parameter case-insensitive
[solanum.git] / extensions / no_locops.c
CommitLineData
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
3fd3d7e1
EM
15static const char no_locops_desc[] = "Disables local operators";
16
6dc16f7e
JT
17static void h_nl_umode_changed(hook_data_umode_changed *);
18
19mapi_hfn_list_av1 nl_hfnlist[] = {
20 { "umode_changed", (hookfn) h_nl_umode_changed },
21 { NULL, NULL }
22};
23
3fd3d7e1 24DECLARE_MODULE_AV2(no_locops, NULL, NULL, NULL, NULL, nl_hfnlist, NULL, NULL, no_locops_desc);
6dc16f7e
JT
25
26static void
27h_nl_umode_changed(hook_data_umode_changed *hdata)
28{
29 struct Client *source_p = hdata->client;
30
31 if (MyClient(source_p) && source_p->umodes & UMODE_LOCOPS)
32 {
33 source_p->umodes &= ~UMODE_LOCOPS;
34 }
35}