diff --git a/Changes b/Changes index d930e60b0..3b9582003 100644 --- a/Changes +++ b/Changes @@ -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). diff --git a/src/extbans.c b/src/extbans.c index e403b9bd6..57ab770e6 100644 --- a/src/extbans.c +++ b/src/extbans.c @@ -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;