From 6f661f71f5d8177a272617bd0a4754854015f479 Mon Sep 17 00:00:00 2001 From: "Emilio A. Escobar" Date: Thu, 20 May 2021 15:38:49 -0700 Subject: [PATCH 01/16] Changes preparing for 2.2.0 release --- CHANGES | 24 ++++++++++++++++++++++++ include/config.h | 2 +- include/patchlevel.h | 4 ++-- 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/CHANGES b/CHANGES index 74dcd938..28eff1e9 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,27 @@ +Changes for 2.2.0: +------------------ +rasengan(2): + Search for WEBIRC users using /rwho (PR #139) + Added /stats P to show listening ports (PR #134) + +Ryan Smith(2): + Override clone limits with SVSCLONE (PR #148) + Updates to user hostmasking (PR #175) + +Emilio Escobar(3): + Fixed oper block corruption when two opers share the same IP (PR #181) + Override softlimits with SVSCLONE (PR #162) + Decrease unknown count if cptr is in unknown state (PR #160) + +Kobi Shmueli(1): + Change user hostmask to send user's IP (PR #179) + +Ned T. Crigler(1): + Make configure test support for extra compiler flags (PR #167) + +jeian(1): + Add XFLAG documentation (PR #155) + Changes for 2.1.6: ------------------ Ryan Smith (4): diff --git a/include/config.h b/include/config.h index 413ee6d4..f412ac47 100644 --- a/include/config.h +++ b/include/config.h @@ -906,7 +906,7 @@ /* * Don't allow local clients to use +h/-h until all servers and services are upgraded. */ -#define NO_LOCAL_CMODE_h +#undef NO_LOCAL_CMODE_h /* ------------------------- END CONFIGURATION SECTION -------------------- */ #ifdef APOLLO diff --git a/include/patchlevel.h b/include/patchlevel.h index afa5714c..da0c2a8c 100644 --- a/include/patchlevel.h +++ b/include/patchlevel.h @@ -21,8 +21,8 @@ #define BASENAME "bahamut" #define MAJOR 2 -#define MINOR 1 -#define PATCH 6 +#define MINOR 2 +#define PATCH 0 #define PATCHES "" From 92b1643bf2dc56b14b76640e28ede74f00f54520 Mon Sep 17 00:00:00 2001 From: "Emilio A. Escobar" Date: Thu, 20 May 2021 15:50:42 -0700 Subject: [PATCH 02/16] Add change mentioning the enabling of half ops --- CHANGES | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 28eff1e9..c305d798 100644 --- a/CHANGES +++ b/CHANGES @@ -8,10 +8,11 @@ Ryan Smith(2): Override clone limits with SVSCLONE (PR #148) Updates to user hostmasking (PR #175) -Emilio Escobar(3): +Emilio Escobar(4): Fixed oper block corruption when two opers share the same IP (PR #181) Override softlimits with SVSCLONE (PR #162) Decrease unknown count if cptr is in unknown state (PR #160) + Enable channel half ops (PR #184) Kobi Shmueli(1): Change user hostmask to send user's IP (PR #179) From 9dcc0a1aea80e010a9f719650975828bea06eb03 Mon Sep 17 00:00:00 2001 From: Ryan Smith Date: Thu, 20 May 2021 22:06:39 -0400 Subject: [PATCH 03/16] Remove "inline" from verbose_to_opers to fix compile errors. --- src/channel.c | 2 +- src/m_nick.c | 2 +- src/s_user.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/channel.c b/src/channel.c index af687ee4..b412e251 100644 --- a/src/channel.c +++ b/src/channel.c @@ -1350,7 +1350,7 @@ int verbose_to_relaychan(aClient *sptr, aChannel *chptr, char *cmd, char *reason } /* A function to send a (verbose) message to +f opers */ -inline void verbose_to_opers(aClient *sptr, aChannel *chptr, char *cmd, char *reason) +void verbose_to_opers(aClient *sptr, aChannel *chptr, char *cmd, char *reason) { if(call_hooks(CHOOK_FLOODWARN, sptr, chptr, 1, cmd, reason) == FLUSH_BUFFER) return; diff --git a/src/m_nick.c b/src/m_nick.c index 6c8c28c3..cc9e1bf3 100644 --- a/src/m_nick.c +++ b/src/m_nick.c @@ -40,7 +40,7 @@ extern int del_dccallow(aClient *, aClient *, int); extern int is_xflags_exempted(aClient *sptr, aChannel *chptr); extern int verbose_to_relaychan(aClient *sptr, aChannel *chptr, char *cmd, char *reason); -extern inline void verbose_to_opers(aClient *sptr, aChannel *chptr, char *cmd, char *reason); +extern void verbose_to_opers(aClient *sptr, aChannel *chptr, char *cmd, char *reason); extern int user_modes[]; diff --git a/src/s_user.c b/src/s_user.c index db80f89e..19497586 100644 --- a/src/s_user.c +++ b/src/s_user.c @@ -59,7 +59,7 @@ extern int send_lusers(aClient *,aClient *,int, char **); #endif extern int is_xflags_exempted(aClient *sptr, aChannel *chptr); /* for m_message() */ extern int verbose_to_relaychan(aClient *sptr, aChannel *chptr, char *cmd, char *reason); /* for m_message() */ -extern inline void verbose_to_opers(aClient *sptr, aChannel *chptr, char *cmd, char *reason); /* for m_message() */ +extern void verbose_to_opers(aClient *sptr, aChannel *chptr, char *cmd, char *reason); /* for m_message() */ extern time_t get_user_jointime(aClient *cptr, aChannel *chptr); /* for send_msg_error() */ extern time_t get_user_lastmsgtime(aClient *cptr, aChannel *chptr); /* also for send_msg_error() -Holbrook */ extern int server_was_split; From 8c7568c924cd65b9be580955d67b57e299abb2a1 Mon Sep 17 00:00:00 2001 From: Ryan Smith Date: Thu, 20 May 2021 22:30:00 -0400 Subject: [PATCH 04/16] Fixing a few typos I found. --- INSTALL | 2 +- doc/Bahamut-team | 2 +- doc/CODING_STANDARD | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/INSTALL b/INSTALL index 5ca07ab8..e29574be 100644 --- a/INSTALL +++ b/INSTALL @@ -16,7 +16,7 @@ HOW TO BUILD: 4. "make install" will install the ircd, config converter, and documents to the directory set by ./configure -5. Edit example.conf in your install directory, and move it to "ircd.conf". +5. Edit template.conf in your install directory, and move it to "ircd.conf". 6. Run the binary! ircd will look in the directory you are executing from for an ircd.conf first, then it will look to the directory local to itself. diff --git a/doc/Bahamut-team b/doc/Bahamut-team index 80555a25..ec620275 100644 --- a/doc/Bahamut-team +++ b/doc/Bahamut-team @@ -1,7 +1,7 @@ Bahamut was taken on by a group of loosely knit coders that decided that Dreamforge just was eating up too much CPU to handle DALnet's growing user base. Originally starting out as the DFhybrid project, it slowly grew -into the Bahamut project as the peices started falling together. +into the Bahamut project as the pieces started falling together. Bahamut is based upon the hybrid IRCd, developed for EFnet, and we most surely wouldn't be where we are today without the dedication of the coders diff --git a/doc/CODING_STANDARD b/doc/CODING_STANDARD index 91453bd8..c2d51a4c 100644 --- a/doc/CODING_STANDARD +++ b/doc/CODING_STANDARD @@ -4,7 +4,7 @@ The following are the Coding Standards for Bahamut. 2) All indentations shall be 4 characters long - no tab characters '\t' 3) All variable names shall begin with a lowercase letter. 4) All variables defined as macros shall be in all Upper Case -5) All preprocessor directive shall be at char posistion 0 with no +5) All preprocessor directive shall be at char position 0 with no spaces after the #. 6) all conditional/loop statements shall have the brace on a line by themselves From e7ae184ad108f8a2cbbb309484f984d0fcbf12e4 Mon Sep 17 00:00:00 2001 From: Ryan Smith Date: Thu, 20 May 2021 22:38:28 -0400 Subject: [PATCH 05/16] Updated change log. --- CHANGES | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/CHANGES b/CHANGES index c305d798..2b608497 100644 --- a/CHANGES +++ b/CHANGES @@ -1,26 +1,33 @@ Changes for 2.2.0: ------------------ -rasengan(2): +rasengan (2): Search for WEBIRC users using /rwho (PR #139) Added /stats P to show listening ports (PR #134) -Ryan Smith(2): +Ryan Smith (6): 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) + Do not allow user mode H to be changed if the user is in any channels. This is to prevent potential client-side weirdness from happening if a user's host changes while they're already in one or more channels. (PR #175) + Send out WATCH notifications if the hostname changes due to a mode H change. (PR #175) + Minor typo fixes. -Emilio Escobar(4): +Emilio Escobar (4): Fixed oper block corruption when two opers share the same IP (PR #181) Override softlimits with SVSCLONE (PR #162) Decrease unknown count if cptr is in unknown state (PR #160) Enable channel half ops (PR #184) -Kobi Shmueli(1): +Kobi Shmueli (1): Change user hostmask to send user's IP (PR #179) -Ned T. Crigler(1): +Ned T. Crigler (1): Make configure test support for extra compiler flags (PR #167) -jeian(1): +jeian (1): Add XFLAG documentation (PR #155) Changes for 2.1.6: From 822819a8a28f4affb989b187e71e113b35db969b Mon Sep 17 00:00:00 2001 From: Ryan Smith <7612149+rscs@users.noreply.github.com> Date: Thu, 20 May 2021 22:51:22 -0400 Subject: [PATCH 06/16] Keep verbose_to_opers as inline; just define it properly in h.h. --- include/h.h | 1 + src/channel.c | 2 +- src/m_nick.c | 3 +-- src/s_user.c | 1 - 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/include/h.h b/include/h.h index cd9e6c2b..87d84900 100644 --- a/include/h.h +++ b/include/h.h @@ -260,6 +260,7 @@ extern int do_numeric(int, aClient *, aClient *, int, char **); extern int hunt_server(aClient *, aClient *, char *, int, int, char **); extern aClient *next_client(aClient *, char *); extern aClient *next_client_double(aClient *, char *); +extern inline void verbose_to_opers(aClient *sptr, aChannel *chptr, char *cmd, char *reason); /* for m_message() */ extern int m_umode(aClient *, aClient *, int, char **); extern int m_names(aClient *, aClient *, int, char **); diff --git a/src/channel.c b/src/channel.c index b412e251..af687ee4 100644 --- a/src/channel.c +++ b/src/channel.c @@ -1350,7 +1350,7 @@ int verbose_to_relaychan(aClient *sptr, aChannel *chptr, char *cmd, char *reason } /* A function to send a (verbose) message to +f opers */ -void verbose_to_opers(aClient *sptr, aChannel *chptr, char *cmd, char *reason) +inline void verbose_to_opers(aClient *sptr, aChannel *chptr, char *cmd, char *reason) { if(call_hooks(CHOOK_FLOODWARN, sptr, chptr, 1, cmd, reason) == FLUSH_BUFFER) return; diff --git a/src/m_nick.c b/src/m_nick.c index cc9e1bf3..ee606d64 100644 --- a/src/m_nick.c +++ b/src/m_nick.c @@ -32,7 +32,7 @@ #include "userban.h" #include "hooks.h" -extern int do_user(char *, aClient *, aClient *, char *, char *, char *, +extern inline int do_user(char *, aClient *, aClient *, char *, char *, char *, unsigned long, char *, char *); extern int register_user(aClient *, aClient *, char *, char *, char *); @@ -40,7 +40,6 @@ extern int del_dccallow(aClient *, aClient *, int); extern int is_xflags_exempted(aClient *sptr, aChannel *chptr); extern int verbose_to_relaychan(aClient *sptr, aChannel *chptr, char *cmd, char *reason); -extern void verbose_to_opers(aClient *sptr, aChannel *chptr, char *cmd, char *reason); extern int user_modes[]; diff --git a/src/s_user.c b/src/s_user.c index 19497586..8c256bba 100644 --- a/src/s_user.c +++ b/src/s_user.c @@ -59,7 +59,6 @@ extern int send_lusers(aClient *,aClient *,int, char **); #endif extern int is_xflags_exempted(aClient *sptr, aChannel *chptr); /* for m_message() */ extern int verbose_to_relaychan(aClient *sptr, aChannel *chptr, char *cmd, char *reason); /* for m_message() */ -extern void verbose_to_opers(aClient *sptr, aChannel *chptr, char *cmd, char *reason); /* for m_message() */ extern time_t get_user_jointime(aClient *cptr, aChannel *chptr); /* for send_msg_error() */ extern time_t get_user_lastmsgtime(aClient *cptr, aChannel *chptr); /* also for send_msg_error() -Holbrook */ extern int server_was_split; From 07cab2f38017959533798810ad4009d14b033f1a Mon Sep 17 00:00:00 2001 From: Ryan Smith <7612149+rscs@users.noreply.github.com> Date: Thu, 20 May 2021 22:52:21 -0400 Subject: [PATCH 07/16] Where did you come from? --- src/m_nick.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/m_nick.c b/src/m_nick.c index ee606d64..ca133402 100644 --- a/src/m_nick.c +++ b/src/m_nick.c @@ -32,7 +32,7 @@ #include "userban.h" #include "hooks.h" -extern inline int do_user(char *, aClient *, aClient *, char *, char *, char *, +extern int do_user(char *, aClient *, aClient *, char *, char *, char *, unsigned long, char *, char *); extern int register_user(aClient *, aClient *, char *, char *, char *); From a4120f252f25b285da217e9eabd6d3c410bfbd7c Mon Sep 17 00:00:00 2001 From: "Emilio A. Escobar" Date: Fri, 21 May 2021 18:39:38 -0700 Subject: [PATCH 08/16] Send notice if services have not sent user hostmasking type --- src/s_user.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/s_user.c b/src/s_user.c index 8c256bba..2ab43270 100644 --- a/src/s_user.c +++ b/src/s_user.c @@ -3411,6 +3411,11 @@ m_umode(aClient *cptr, aClient *sptr, int parc, char *parv[]) hash_check_watch(sptr, RPL_LOGON); } } + else + { + sendto_one(sptr, ":%s NOTICE %s :*** Notice -- Server has not received hostmaskt type, please contact SRA.", + me.name, sptr->name); + } break; #endif case 'A': From 940051aea0b80fd95aefb012ca709903c30e427c Mon Sep 17 00:00:00 2001 From: "Emilio A. Escobar" Date: Sat, 22 May 2021 12:39:31 -0700 Subject: [PATCH 09/16] Fixed typo --- src/s_user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/s_user.c b/src/s_user.c index 2ab43270..8ad95ef9 100644 --- a/src/s_user.c +++ b/src/s_user.c @@ -3413,7 +3413,7 @@ m_umode(aClient *cptr, aClient *sptr, int parc, char *parv[]) } else { - sendto_one(sptr, ":%s NOTICE %s :*** Notice -- Server has not received hostmaskt type, please contact SRA.", + sendto_one(sptr, ":%s NOTICE %s :*** Notice -- Server has not received hostmask type, please contact SRA.", me.name, sptr->name); } break; From f065e12f9f7161bd4b4c90c5ffc77009e6ca6b56 Mon Sep 17 00:00:00 2001 From: "Emilio A. Escobar" Date: Sat, 22 May 2021 14:16:13 -0700 Subject: [PATCH 10/16] Fixing rwho for WEBIRC Unless we're intending to only show local clients, myclient() isn't useful here. --- src/m_rwho.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/m_rwho.c b/src/m_rwho.c index efb570ce..ea80177a 100644 --- a/src/m_rwho.c +++ b/src/m_rwho.c @@ -983,9 +983,9 @@ static int rwho_match(aClient *cptr, int *failcode, aClient **failclient) return 0; } - if (MyClient(cptr) && (rwho_opts.check[0] & RWM_WEBIRC) && !cptr->webirc_ip) + if ((rwho_opts.check[0] & RWM_WEBIRC) && !cptr->webirc_ip) return 0; - else if (MyClient(cptr) && (rwho_opts.check[1] & RWM_WEBIRC) && cptr->webirc_ip) + else if ((rwho_opts.check[1] & RWM_WEBIRC) && cptr->webirc_ip) return 0; if (rwho_opts.check[1] & RWM_IP) From fd6fb83f536a6cecb864323284121010a04ed5db Mon Sep 17 00:00:00 2001 From: "Emilio A. Escobar" Date: Mon, 24 May 2021 08:17:32 -0700 Subject: [PATCH 11/16] Fixes to be able to rwho for webirc clients globally --- include/struct.h | 3 +++ src/m_rwho.c | 4 ++-- src/s_user.c | 6 ++++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/include/struct.h b/include/struct.h index 0fdfb97e..65c5add6 100644 --- a/include/struct.h +++ b/include/struct.h @@ -314,7 +314,9 @@ typedef struct SServicesTag ServicesTag; #define UMODE_I 0x8000000 /* umode +I - invisible oper (masked) */ #define UMODE_S 0x10000000 /* umode +S - User is using SSL */ #define UMODE_C 0x20000000 /* umode +C - User is only accepting private messages from users who share a common channel with them */ +#define UMODE_W 0x30000000 /* umode +W - User is connected from WEBIRC */ #define UMODE_H 0x40000000 /* umode +H - User is host-masked */ + /* WARNING: Do not add any values greater than 0x40000000 unless you change Client->umode to unsigned long (and change everything else to support it) -Kobi & xPsycho. */ @@ -356,6 +358,7 @@ typedef struct SServicesTag ServicesTag; #define IsOper(x) ((x)->umode & UMODE_o) #define IsLocOp(x) ((x)->umode & UMODE_O) +#define IsWebIRC(x) ((x)->umode & UMODE_W) #define IsInvisible(x) ((x)->umode & UMODE_i) #define IsAnOper(x) ((x)->umode & (UMODE_o|UMODE_O)) #define CanBeOper(x) ((x)->umode & (UMODE_o|UMODE_O|UMODE_I)) diff --git a/src/m_rwho.c b/src/m_rwho.c index ea80177a..ca5787fb 100644 --- a/src/m_rwho.c +++ b/src/m_rwho.c @@ -983,9 +983,9 @@ static int rwho_match(aClient *cptr, int *failcode, aClient **failclient) return 0; } - if ((rwho_opts.check[0] & RWM_WEBIRC) && !cptr->webirc_ip) + if ((rwho_opts.check[0] & RWM_WEBIRC) && !IsWebIRC(cptr)) return 0; - else if ((rwho_opts.check[1] & RWM_WEBIRC) && cptr->webirc_ip) + else if ((rwho_opts.check[1] & RWM_WEBIRC) && IsWebIRC(cptr)) return 0; if (rwho_opts.check[1] & RWM_IP) diff --git a/src/s_user.c b/src/s_user.c index 8ad95ef9..f9824f29 100644 --- a/src/s_user.c +++ b/src/s_user.c @@ -103,6 +103,7 @@ int user_modes[] = UMODE_S, 'S', UMODE_K, 'K', UMODE_I, 'I', + UMODE_W, 'W', #ifdef SPAMFILTER UMODE_P, 'P', #endif @@ -2374,6 +2375,11 @@ do_user(char *nick, aClient *cptr, aClient *sptr, char *username, char *host, if((uhm_type > 0) && (uhm_umodeh == 1)) sptr->umode |= UMODE_H; else sptr->umode &= ~UMODE_H; #endif + if (cptr->webirc_ip) + sptr->umode |= UMODE_W; + else + sptr->umode &= ~UMODE_W; + user->server = me.name; } strncpyzt(sptr->info, realname, sizeof(sptr->info)); From 7ba995c3de2d238e714c7fa18b9d366a032fa957 Mon Sep 17 00:00:00 2001 From: "Emilio A. Escobar" Date: Mon, 24 May 2021 12:48:40 -0700 Subject: [PATCH 12/16] Add UMODE_W to SEND_UMODEs and disable usage of umode W within m_umode --- include/struct.h | 2 +- src/s_user.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/struct.h b/include/struct.h index 65c5add6..eb84283d 100644 --- a/include/struct.h +++ b/include/struct.h @@ -341,7 +341,7 @@ typedef struct SServicesTag ServicesTag; * that mode will be 'silent.' */ -#define SEND_UMODES (UMODE_a|UMODE_i|UMODE_o|UMODE_r|UMODE_A|UMODE_I|UMODE_R|UMODE_S|UMODE_C|UMODE_H|UMODE_P) +#define SEND_UMODES (UMODE_a|UMODE_i|UMODE_o|UMODE_r|UMODE_A|UMODE_I|UMODE_R|UMODE_S|UMODE_C|UMODE_H|UMODE_P|UMODE_W) #define ALL_UMODES (SEND_UMODES|UMODE_b|UMODE_c|UMODE_d|UMODE_e|UMODE_f|\ UMODE_g|UMODE_h|UMODE_j|UMODE_k|UMODE_m|UMODE_n|UMODE_s|\ UMODE_w|UMODE_y|UMODE_F|UMODE_K|UMODE_O) diff --git a/src/s_user.c b/src/s_user.c index f9824f29..6b22d298 100644 --- a/src/s_user.c +++ b/src/s_user.c @@ -3361,6 +3361,7 @@ m_umode(aClient *cptr, aClient *sptr, int parc, char *parv[]) case 'r': case 'x': case 'X': + case 'W': case 'S': break; /* users can't set themselves +r,+x,+X or +S! */ #ifdef USER_HOSTMASKING From 8063f797ef920c8d25049b7e6a1095e69799a0ac Mon Sep 17 00:00:00 2001 From: Ryan Smith <7612149+rscs@users.noreply.github.com> Date: Tue, 6 Jul 2021 17:03:23 -0400 Subject: [PATCH 13/16] Remove redundant USER_HOSTMASKING_FALLBACK_TO_IP logic as we are now handling this in the module. --- CHANGES | 1 - include/config.h | 9 --------- src/s_user.c | 5 ----- 3 files changed, 15 deletions(-) diff --git a/CHANGES b/CHANGES index 2b608497..f5d16f45 100644 --- a/CHANGES +++ b/CHANGES @@ -7,7 +7,6 @@ rasengan (2): Ryan Smith (6): 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) diff --git a/include/config.h b/include/config.h index f412ac47..4241ac3f 100644 --- a/include/config.h +++ b/include/config.h @@ -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. diff --git a/src/s_user.c b/src/s_user.c index 6b22d298..f09cbd18 100644 --- a/src/s_user.c +++ b/src/s_user.c @@ -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... :( */ } From 73bf49c28320e6780c65b751395e2e8921350fc4 Mon Sep 17 00:00:00 2001 From: Ryan Smith <7612149+rscs@users.noreply.github.com> Date: Tue, 6 Jul 2021 17:07:35 -0400 Subject: [PATCH 14/16] Fix changes count. --- CHANGES | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index f5d16f45..8dad873e 100644 --- a/CHANGES +++ b/CHANGES @@ -4,7 +4,7 @@ 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) Do not attempt to mask the Staff_Address for opers. (PR #175) From d74c1d45f778b025f7b0bcc914fd9715802f8444 Mon Sep 17 00:00:00 2001 From: "Emilio A. Escobar" Date: Wed, 7 Jul 2021 11:56:07 -0700 Subject: [PATCH 15/16] Make contact statement generic --- src/s_user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/s_user.c b/src/s_user.c index 6b22d298..5eb797d2 100644 --- a/src/s_user.c +++ b/src/s_user.c @@ -3420,7 +3420,7 @@ m_umode(aClient *cptr, aClient *sptr, int parc, char *parv[]) } else { - sendto_one(sptr, ":%s NOTICE %s :*** Notice -- Server has not received hostmask type, please contact SRA.", + sendto_one(sptr, ":%s NOTICE %s :*** Notice -- Server has not received hostmask type, please contact the network's staff.", me.name, sptr->name); } break; From 453f9361a5776575a35d7f30632bf800fac2cbb9 Mon Sep 17 00:00:00 2001 From: "Emilio A. Escobar" Date: Wed, 7 Jul 2021 12:02:04 -0700 Subject: [PATCH 16/16] use Network_Name instead --- src/s_user.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/s_user.c b/src/s_user.c index f5eaf8b4..317b00e6 100644 --- a/src/s_user.c +++ b/src/s_user.c @@ -3415,8 +3415,8 @@ m_umode(aClient *cptr, aClient *sptr, int parc, char *parv[]) } else { - sendto_one(sptr, ":%s NOTICE %s :*** Notice -- Server has not received hostmask type, please contact the network's staff.", - me.name, sptr->name); + sendto_one(sptr, ":%s NOTICE %s :*** Notice -- Server has not received hostmask type, please contact %s staff.", + me.name, sptr->name, Network_Name); } break; #endif