mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-07-10 06:23:13 +02:00
Added extended ban ~j.
This commit is contained in:
@@ -1532,3 +1532,4 @@
|
||||
- Booting ircd waits for 1 second to check if runs correctly. If not, waits for 4 more seconds
|
||||
to check again, suggested by vonitsanet (#0003136).
|
||||
- Fixed a typo in help.conf, reported by Sakkath (#0003196).
|
||||
- Added extended ban ~j, reported by Shining Phoenix (#0003192).
|
||||
|
||||
@@ -267,6 +267,16 @@ char *ban = banin + 3;
|
||||
return extban_is_banned_helper(ban);
|
||||
}
|
||||
|
||||
int extban_modej_is_banned(aClient* sptr, aChannel* chptr, char* banin, int type)
|
||||
{
|
||||
char* ban = banin + 3;
|
||||
|
||||
if (type != BANCHK_JOIN)
|
||||
return 0;
|
||||
|
||||
return extban_is_banned_helper(ban);
|
||||
}
|
||||
|
||||
/** Some kind of general conv_param routine,
|
||||
* to ensure the parameter is nick!user@host.
|
||||
* most of the code is just copied from clean_ban_mask.
|
||||
@@ -345,6 +355,12 @@ void extban_init(void)
|
||||
req.is_banned = extban_moden_is_banned;
|
||||
ExtbanAdd(NULL, req);
|
||||
|
||||
memset(&req, 0, sizeof(ExtbanInfo));
|
||||
req.flag = 'j';
|
||||
req.conv_param = extban_conv_param_nuh;
|
||||
req.is_banned = extban_modej_is_banned;
|
||||
ExtbanAdd(NULL, req);
|
||||
|
||||
memset(&req, 0, sizeof(ExtbanInfo));
|
||||
req.flag = 'r';
|
||||
req.conv_param = extban_moder_conv_param;
|
||||
|
||||
Reference in New Issue
Block a user