mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-07-07 13:43:12 +02:00
Add set::manual-ban-target as well (affects /KLINE nick, etc).
Requested by marco500 in https://bugs.unrealircd.org/view.php?id=5029 For more information, see: https://www.unrealircd.org/docs/Set_block#set::manual-ban-target
This commit is contained in:
+4
-16
@@ -84,6 +84,7 @@ int _join_viruschan(Client *client, TKL *tk, int type);
|
||||
void _spamfilter_build_user_string(char *buf, char *nick, Client *client);
|
||||
int _match_user(char *rmask, Client *client, int options);
|
||||
int _match_user_extended_server_ban(char *banstr, Client *client);
|
||||
void ban_target_to_tkl_layer(BanTarget ban_target, BanAction action, Client *client, char **tkl_username, char **tkl_hostname);
|
||||
int _tkl_ip_hash(char *ip);
|
||||
int _tkl_ip_hash_type(int type);
|
||||
TKL *_find_tkl_serverban(int type, char *usermask, char *hostmask, int softban);
|
||||
@@ -1363,29 +1364,16 @@ void cmd_tkl_line(Client *client, int parc, char *parv[], char *type)
|
||||
return;
|
||||
}
|
||||
}
|
||||
/* set 'p' right for later... */
|
||||
p = hostmask-1;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* It's seemingly a nick .. let's see if we can find the user */
|
||||
if ((acptr = find_person(mask, NULL)))
|
||||
{
|
||||
usermask = "*";
|
||||
BanAction action = BAN_ACT_KLINE; // just a dummy default
|
||||
if ((*type == 'z') || (*type == 'Z'))
|
||||
{
|
||||
/* Fill in IP */
|
||||
hostmask = GetIP(acptr);
|
||||
if (!hostmask)
|
||||
{
|
||||
sendnotice(client, "Could not get IP for user '%s'", acptr->name);
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
/* Fill in host */
|
||||
hostmask = acptr->user->realhost;
|
||||
}
|
||||
p = hostmask - 1;
|
||||
action = BAN_ACT_ZLINE; // to indicate zline (no hostname, no dns, etc)
|
||||
ban_target_to_tkl_layer(iConf.manual_ban_target, action, acptr, &usermask, &hostmask);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user