mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-07-05 13:53:12 +02:00
Made SVSMODE -b and -e remove bans/excepts placed on IPs
This commit is contained in:
@@ -525,3 +525,4 @@
|
||||
nothing else).
|
||||
- Fixed 'make install' error due to example.settings remove.
|
||||
- Fixed a minor typo in the "now an oper" announcement (#0002284) reported by Rocko.
|
||||
- Made SVSMODE -b and -e remove bans/excepts placed on IPs (#0002270) reported by Snake.
|
||||
|
||||
+11
-2
@@ -197,6 +197,7 @@ int channel_svsmode(aClient *cptr, aClient *sptr, int parc, char *parv[])
|
||||
Ban *ban, *bnext;
|
||||
if (parc >= i) {
|
||||
char uhost[NICKLEN+USERLEN+HOSTLEN+6], vhost[NICKLEN+USERLEN+HOSTLEN+6];
|
||||
char ihost[NICKLEN+USERLEN+HOSTLEN+6];
|
||||
if (!(acptr = find_person(parv[i-1], NULL))) {
|
||||
i++;
|
||||
break;
|
||||
@@ -213,10 +214,13 @@ int channel_svsmode(aClient *cptr, aClient *sptr, int parc, char *parv[])
|
||||
strlcpy(vhost, make_nick_user_host(acptr->name,
|
||||
acptr->user->username, GetHost(acptr)),
|
||||
sizeof vhost);
|
||||
strlcpy(ihost, make_nick_user_host(acptr->name,
|
||||
acptr->user->username, GetIP(acptr)),
|
||||
sizeof ihost);
|
||||
ban = chptr->banlist;
|
||||
while (ban) {
|
||||
bnext = ban->next;
|
||||
if (!match(ban->banstr, uhost) || !match(ban->banstr, vhost)) {
|
||||
if (!match(ban->banstr, uhost) || !match(ban->banstr, vhost) || !match(ban->banstr, ihost)) {
|
||||
add_send_mode_param(chptr, sptr, '-', 'b',
|
||||
ban->banstr);
|
||||
del_banid(chptr, ban->banstr);
|
||||
@@ -239,6 +243,7 @@ int channel_svsmode(aClient *cptr, aClient *sptr, int parc, char *parv[])
|
||||
Ban *ban, *bnext;
|
||||
if (parc >= i) {
|
||||
char uhost[NICKLEN+USERLEN+HOSTLEN+6], vhost[NICKLEN+USERLEN+HOSTLEN+6];
|
||||
char ihost[NICKLEN+USERLEN+HOSTLEN+6];
|
||||
if (!(acptr = find_person(parv[i-1], NULL))) {
|
||||
i++;
|
||||
break;
|
||||
@@ -255,10 +260,14 @@ int channel_svsmode(aClient *cptr, aClient *sptr, int parc, char *parv[])
|
||||
strlcpy(vhost, make_nick_user_host(acptr->name,
|
||||
acptr->user->username, GetHost(acptr)),
|
||||
sizeof vhost);
|
||||
strlcpy(ihost, make_nick_user_host(acptr->name,
|
||||
acptr->user->username, GetIP(acptr)),
|
||||
sizeof ihost);
|
||||
|
||||
ban = chptr->exlist;
|
||||
while (ban) {
|
||||
bnext = ban->next;
|
||||
if (!match(ban->banstr, uhost) || !match(ban->banstr, vhost)) {
|
||||
if (!match(ban->banstr, uhost) || !match(ban->banstr, vhost) || !match(ban->banstr, ihost)) {
|
||||
add_send_mode_param(chptr, sptr, '-', 'e',
|
||||
ban->banstr);
|
||||
del_exbanid(chptr, ban->banstr);
|
||||
|
||||
Reference in New Issue
Block a user