]>
jfr.im git - solanum.git/blob - extensions/extb_channel.c
2 * Channel extban type: matches users who are in a certain channel
13 static const char extb_desc
[] = "Channel ($c) extban type";
15 static int _modinit(void);
16 static void _moddeinit(void);
17 static int eb_channel(const char *data
, struct Client
*client_p
, struct Channel
*chptr
, long mode_type
);
19 DECLARE_MODULE_AV2(extb_channel
, _modinit
, _moddeinit
, NULL
, NULL
, NULL
, NULL
, NULL
, extb_desc
);
24 extban_table
['c'] = eb_channel
;
32 extban_table
['c'] = NULL
;
35 static int eb_channel(const char *data
, struct Client
*client_p
,
36 struct Channel
*chptr
, long mode_type
)
38 struct Channel
*chptr2
;
43 return EXTBAN_INVALID
;
44 chptr2
= find_channel(data
);
46 return EXTBAN_INVALID
;
47 /* require consistent target */
48 if (chptr
->chname
[0] == '#' && data
[0] == '&')
49 return EXTBAN_INVALID
;
50 return IsMember(client_p
, chptr2
) ? EXTBAN_MATCH
: EXTBAN_NOMATCH
;