Skip to content

Commit

Permalink
Merge pull request #188 from DALnet/remove-redundant-ip-hostmasking
Browse files Browse the repository at this point in the history
  • Loading branch information
eaescob authored Jul 6, 2021
2 parents 7ba995c + 73bf49c commit a37dcce
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 16 deletions.
3 changes: 1 addition & 2 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ rasengan (2):
Search for WEBIRC users using /rwho (PR #139)
Added /stats P to show listening ports (PR #134)

Ryan Smith (6):
Ryan Smith (8):
Override clone limits with SVSCLONE (PR #148)
Updates to user hostmasking (PR #175)
Added new config.h option: USER_HOSTMASKING_FALLBACK_TO_IP. This is used to hostmask using the user's IP address if we are unable to hostmask using their hostname. This usually happens if they're using a domain name without a lot of labels: somehost.com or company.co.uk or similar. (PR #175)
Do not attempt to mask the Staff_Address for opers. (PR #175)
Do not allow opers who are already hostmasked to set +H as this results in weird /whois results. (PR #175)
Added new config.h option: NO_UMODE_H_FLOOD. Do not allow the user to change user mode H too often, to prevent WATCH flooding. (PR #175)
Expand Down
9 changes: 0 additions & 9 deletions include/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -873,15 +873,6 @@
*/
#define USER_HOSTMASKING

/* USER_HOSTMASKING_FALLBACK_TO_IP is used to hostmask using the user's IP
* address if we are unable to hostmask using their hostname. This usually
* happens if they're using a domain name without a lot of labels:
* somehost.com or company.co.uk or similar.
*/
#ifdef USER_HOSTMASKING
#define USER_HOSTMASKING_FALLBACK_TO_IP
#endif

/* SPAMFILTER is used to enable spam filtering on the network.
* If you are connected to the main DALnet network, you should
* have this enabled.
Expand Down
5 changes: 0 additions & 5 deletions src/s_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -460,11 +460,6 @@ char *mask_host(char *orghost, char *orgip, int type)

if (call_hooks(CHOOK_MASKHOST, orghost, orgip, &newhost, type) == UHM_SUCCESS) return newhost;

#ifdef USER_HOSTMASKING_FALLBACK_TO_IP
// If the initial call fails, the user has a short hostname that we couldn't mask, so retry masking with the IP.
if (call_hooks(CHOOK_MASKHOST, orgip, &newhost, type) == UHM_SUCCESS) return newhost;
#endif

return orghost; /* I guess the user won't be host-masked after all... :( */
}

Expand Down

0 comments on commit a37dcce

Please sign in to comment.