]>
Commit | Line | Data |
---|---|---|
32d57028 AC |
1 | /* |
2 | * Override WHOIS logic to hide channel memberships that are not common. | |
3 | * -- kaniini | |
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 | ||
eeabf33a EM |
15 | static const char hide_desc[] = "Hides channel memberships not shared"; |
16 | ||
5e413b13 | 17 | static void h_huc_doing_whois_channel_visibility(void *); |
32d57028 AC |
18 | |
19 | mapi_hfn_list_av1 huc_hfnlist[] = { | |
20 | { "doing_whois_channel_visibility", (hookfn) h_huc_doing_whois_channel_visibility }, | |
21 | { NULL, NULL } | |
22 | }; | |
23 | ||
dacd2aa8 | 24 | DECLARE_MODULE_AV2(hide_uncommon_channels, NULL, NULL, NULL, NULL, huc_hfnlist, NULL, NULL, hide_desc); |
32d57028 AC |
25 | |
26 | static void | |
5e413b13 | 27 | h_huc_doing_whois_channel_visibility(void *data_) |
32d57028 | 28 | { |
5e413b13 | 29 | hook_data_channel_visibility *data = data_; |
e8a8d7a4 | 30 | data->approved = data->approved && (!IsInvisible(data->target) || data->clientms != NULL); |
32d57028 | 31 | } |