]> jfr.im git - solanum.git/blobdiff - extensions/hide_uncommon_channels.c
Remove Windows support
[solanum.git] / extensions / hide_uncommon_channels.c
index c9e03a22d5fbdef0172cff3d6c8fdfbf3326c4f4..f9587b64e7dd340cb6168561478f37187128a446 100644 (file)
 #include "s_conf.h"
 #include "s_newconf.h"
 
-static void h_huc_doing_whois_channel_visibility(hook_data_client *);
+static const char hide_desc[] = "Hides channel memberships not shared";
+
+static void h_huc_doing_whois_channel_visibility(void *);
 
 mapi_hfn_list_av1 huc_hfnlist[] = {
        { "doing_whois_channel_visibility", (hookfn) h_huc_doing_whois_channel_visibility },
        { NULL, NULL }
 };
 
-static const char hide_desc[] = "Hides channel memberships not shared";
-
 DECLARE_MODULE_AV2(hide_uncommon_channels, NULL, NULL, NULL, NULL, huc_hfnlist, NULL, NULL, hide_desc);
 
 static void
-h_huc_doing_whois_channel_visibility(hook_data_client *hdata)
+h_huc_doing_whois_channel_visibility(void *data_)
 {
-       hdata->approved = ((PubChannel(hdata->chptr) && !IsInvisible(hdata->target)) || IsMember((hdata->client), (hdata->chptr)));
+       hook_data_channel_visibility *data = data_;
+       data->approved = data->approved && (!IsInvisible(data->target) || data->clientms != NULL);
 }