diff -ur --minimal ircd-hybrid-5.3p8/include/config.h ircd-hybrid-5.3p8+ins/include/config.h --- ircd-hybrid-5.3p8/include/config.h Sat Jul 29 17:02:36 2000 +++ ircd-hybrid-5.3p8+ins/include/config.h Wed Feb 7 04:04:00 2001 @@ -694,6 +694,18 @@ #define NO_PRIORITY +/* SPOOF - hostname spoofing + * + * If this is defined, clients connecting who match a spoofed I line will have + * their hostname changed to SPOOFHOST. + * I lines should be added like this: + * + * I:NOMATCH::=user@host::1 + */ + +#define SPOOF +#define SPOOFHOST "oper.irc.ins.net.uk" + /* STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP */ /* You shouldn't change anything below this line, unless absolutely needed. */ diff -ur --minimal ircd-hybrid-5.3p8/include/patchlevel.h ircd-hybrid-5.3p8+ins/include/patchlevel.h --- ircd-hybrid-5.3p8/include/patchlevel.h Sat Aug 7 06:49:02 1999 +++ ircd-hybrid-5.3p8+ins/include/patchlevel.h Wed Feb 7 04:03:07 2001 @@ -17,5 +17,5 @@ */ #ifndef PATCHLEVEL -#define PATCHLEVEL "2.8/hybrid-5.3p8" +#define PATCHLEVEL "2.8/hybrid-5.3p8/ins" #endif diff -ur --minimal ircd-hybrid-5.3p8/include/struct.h ircd-hybrid-5.3p8+ins/include/struct.h --- ircd-hybrid-5.3p8/include/struct.h Sat Jul 29 17:02:36 2000 +++ ircd-hybrid-5.3p8+ins/include/struct.h Wed Feb 7 04:04:36 2001 @@ -343,6 +343,9 @@ char *passwd; char *name; int port; +#ifdef SPOOF + int spoof; /* spoofed ip */ +#endif time_t hold; /* Hold action until this time (calendar time) */ aClass *class; /* Class of connection */ struct ConfItem *next; diff -ur --minimal ircd-hybrid-5.3p8/src/s_conf.c ircd-hybrid-5.3p8+ins/src/s_conf.c --- ircd-hybrid-5.3p8/src/s_conf.c Thu Jul 20 02:09:27 2000 +++ ircd-hybrid-5.3p8+ins/src/s_conf.c Wed Feb 7 04:07:44 2001 @@ -220,6 +220,15 @@ /* only check it if its non zero */ if ((aconf->class->conFreq) && (ip_found->count > aconf->class->conFreq)) return -4; /* Already at maximum allowed ip#'s */ +#ifdef SPOOF + if (aconf->spoof) { + char *p = cptr->sockhost, *q = aconf->name; + while(*q != '@' && *q) + q++; + strcpy(p, SPOOFHOST); + } +#endif + return ( attach_conf(cptr, aconf) ); } @@ -1296,7 +1305,17 @@ DupString(aconf->passwd, tmp); if ((tmp = getfield(NULL)) == NULL) break; - DupString(aconf->name, tmp); + switch(tmp[0]) { +#ifdef SPOOF + case '=': /* spoof this host */ + aconf->spoof=1; + DupString(aconf->name, tmp+1); + break; +#endif + default: + DupString(aconf->name, tmp); + break; + } if ((tmp = getfield(NULL)) == NULL) break; aconf->port = atoi(tmp); diff -ur --minimal ircd-hybrid-5.3p8/src/s_serv.c ircd-hybrid-5.3p8+ins/src/s_serv.c --- ircd-hybrid-5.3p8/src/s_serv.c Thu Jul 20 02:09:27 2000 +++ ircd-hybrid-5.3p8+ins/src/s_serv.c Wed Feb 7 04:09:55 2001 @@ -1644,7 +1644,14 @@ c = (char)*(p+2); host = BadPtr(tmp->host) ? null : tmp->host; pass = BadPtr(tmp->passwd) ? null : tmp->passwd; - name = BadPtr(tmp->name) ? null : tmp->name; +#ifdef SPOOF + if (tmp->spoof && !IsOper(sptr)) { + name = "[HIDDEN]"; + } else { + name = BadPtr(tmp->name) ? null : tmp->name; + } +#endif + port = (int)tmp->port; /*