* maint: Fix ban/exempt/invite masking not working with 10-char idents.
@@ -9,6 +9,7 @@
* Use Linux's prctl(PR_SET_DUMPABLE) to disable core dumps and ptrace(2).
* Use FreeBSD 10's procctl(PROC_TRACE_CTL) to disable core dumps and tracing.
* Fix binary compat issue causing ptrace permission errors on Linux 3.4+
+ * Fix ban/exempt/invite masking not working with 10-char idents.
# 1.4.6
* Disable demo TCL support by default to prevent confusion during build.
@@ -267,6 +267,12 @@ void maskaddr(const char *s, char *nw, int type)
*nw++ = '*';
if (strchr("~+-^=", *u))
u++; /* trim leading crap */
+ /*
+ * Take last 9 chars to avoid running up against 10-char limit for
+ * username on ratbox. The older eggdrop code used this limit as well.
+ */
+ while (h - u > 9)
+ u++;
}
strncpy(nw, u, h - u);
nw += h - u;