3 * Well, it won't stop them all, unless this is loaded on all servers.
5 * Copyright (C) 2013 Elizabeth Myers. All rights reserved.
6 * Licensed under the WTFPLv2
20 #include "privilege.h"
21 #include "s_newconf.h"
23 static const char nokill_desc
[] = "Prevents operators from killing services";
25 static void block_services_kill(void *data
);
27 mapi_hfn_list_av1 no_kill_services_hfnlist
[] = {
28 { "can_kill", (hookfn
) block_services_kill
},
33 block_services_kill(void *vdata
)
35 hook_data_client_approval
*data
= (hook_data_client_approval
*) vdata
;
37 if (!MyClient(data
->client
))
43 if (IsService(data
->target
))
45 sendto_one_numeric(data
->client
, ERR_ISCHANSERVICE
,
46 "KILL %s :Cannot kill a network service",
52 DECLARE_MODULE_AV2(no_kill_services
, NULL
, NULL
, NULL
, NULL
,
53 no_kill_services_hfnlist
, NULL
, NULL
, nokill_desc
);