]>
jfr.im git - solanum.git/blob - extensions/extb_channel.c
2 * Channel extban type: matches users who are in a certain public channel
13 static int _modinit(void);
14 static void _moddeinit(void);
15 static int eb_channel(const char *data
, struct Client
*client_p
, struct Channel
*chptr
, long mode_type
);
17 DECLARE_MODULE_AV1(extb_channel
, _modinit
, _moddeinit
, NULL
, NULL
, NULL
, "$Revision: 1723 $");
22 extban_table
['c'] = eb_channel
;
30 extban_table
['c'] = NULL
;
33 static int eb_channel(const char *data
, struct Client
*client_p
,
34 struct Channel
*chptr
, long mode_type
)
36 struct Channel
*chptr2
;
41 return EXTBAN_INVALID
;
42 chptr2
= find_channel(data
);
44 return EXTBAN_INVALID
;
45 /* require consistent target */
46 if (chptr
->chname
[0] == '#' && data
[0] == '&')
47 return EXTBAN_INVALID
;
48 /* privacy! don't allow +s/+p channels to influence another channel */
49 if (!PubChannel(chptr2
) && chptr2
!= chptr
)
50 return EXTBAN_INVALID
;
51 return IsMember(client_p
, chptr2
) ? EXTBAN_MATCH
: EXTBAN_NOMATCH
;