diff --git a/ChangeLog b/ChangeLog index cfd19af..3673859 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,14 +4,16 @@ Symbols are: (F) - Fish (fish@dynam.ac) (S) - Shmad (shmad@neostats.net) (HP) - Hybrid Team Patches to Hybrid Source + * NeoIRCd Version 0.9.5 - 12th Oct, 2002 - Fish -(F) - Fixed up Server info lines not being propogated correctly -(F) - fixed up m_message.so so that opers/services can send to anyhost with /msg $$* (For operserv global compat) - - -* NeoIRCd Version 0.9.4 - 24th Sept, 2002 - Fish (S) - Fixed up event.c for a possible serious bug reported by Dianora from hybrid team Also thanks for the reference and event code in question. +(F) - Fixed up Server info lines not being propogated correctly +(F) - fixed up m_message.so so that opers/services can send to anyhost with /msg $$* (For operserv global compat) +(F) - Fixed up Hidden Servers to work correctly... (/map /links /whois etc) +(F) - Fixed Usermode problems. + +* NeoIRCd Version 0.9.4 - 24th Sept, 2002 - Fish (F) - Changed HiddenHost System to Use Ultimates version instead... (F) - Changed NICK and Client Messages to include vhost, so we dont have to burst SETHOST (F) - Don't burst SETHOST when we remove -x diff --git a/TODO b/TODO index 6cb79cd..f40be4b 100644 --- a/TODO +++ b/TODO @@ -1,9 +1,15 @@ -$Id: TODO,v 1.10 2002/09/23 03:14:20 fishwaldo Exp $ +$Id: TODO,v 1.11 2002/10/16 05:04:23 fishwaldo Exp $ NeoStats HostServ should accept /privmsg hostserv login for NeoIRCD vhost support! /stats g should report when a G line will expire +don't deop servicesclient on netjoin + +hiddenservers don't hide + + + POST 1.0 *Umode +b (Bots) to identify bots (iEf2002) *it would be nice if we could pass message handlers the actuall command that triggered the handler diff --git a/include/client.h b/include/client.h index 3f0f86f..8d27007 100644 --- a/include/client.h +++ b/include/client.h @@ -19,7 +19,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA * - * $Id: client.h,v 1.8 2002/09/13 16:30:03 fishwaldo Exp $ + * $Id: client.h,v 1.9 2002/10/16 05:04:23 fishwaldo Exp $ */ #ifndef INCLUDED_client_h @@ -625,6 +625,6 @@ extern int change_local_nick(struct Client *client_p, struct Client *source_p, char *nick); extern void dead_link(struct Client *client_p); extern void exit_aborted_clients(void); -extern char *make_virthost(char *curr, char *new, int mode); +extern void make_virthost(char *curr, char *host, char *new); #endif /* INCLUDED_client_h */ diff --git a/src/cloak.c b/src/cloak.c index 4ae84fd..4fbcb39 100644 --- a/src/cloak.c +++ b/src/cloak.c @@ -19,7 +19,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA * - * $Id: cloak.c,v 1.3 2002/09/24 11:50:16 fishwaldo Exp $ + * $Id: cloak.c,v 1.4 2002/10/16 05:01:53 fishwaldo Exp $ */ /* ** @@ -54,14 +54,11 @@ #include "s_conf.h" #include "memory.h" -/* Hidden host code below */ - -#define KEY 94214 -#define KEY2 83645 -#define KEY3 29734 +#define KEY 23857 +#define KEY2 38447 +#define KEY3 64709 int str2arr (char **, char *, char *); - unsigned long crc32 (const unsigned char *s, unsigned int len); @@ -202,11 +199,12 @@ str2arr (char **pparv, char *string, char *delim) /* Regular user host */ -char -*make_virthost (char *curr, char *host, int mode) +void +make_virthost (char *curr, char *host, char *new) { - static char mask[HOSTLEN +1]; - char *parv[HOSTLEN + 1], *parv2[HOSTLEN + 1], s[HOSTLEN + 1], s2[HOSTLEN + 2]; + static char mask[HOSTLEN + 1]; + char *parv[HOSTLEN + 1], *parv2[HOSTLEN + 1], s[HOSTLEN + 1], + s2[HOSTLEN + 2]; int parc = 0, parc2 = 0, len = 0; unsigned long hash[8]; @@ -230,11 +228,11 @@ char hash[1] >>= 2; /* Check if host could be IPv4 */ - if (parc == 4) + if (parc2 == 4) { - len = strlen (parv[3]); + len = strlen (parv2[3]); /* Check if its an IPv4 for sure */ - if (strchr ("0123456789", parv[3][len - 1])) + if (strchr ("0123456789", parv2[3][len - 1])) { hash[2] = ((crc32 (parv[1], strlen (parv[1])) + KEY2) ^ KEY) ^ KEY3; hash[3] = ((crc32 (parv[0], strlen (parv[0])) + KEY2) ^ KEY) ^ KEY3; @@ -245,37 +243,30 @@ char hash[3] <<= 2; hash[3] >>= 2; - ircsprintf (mask, "%lX.%lX.%lX.%lXX", + ircsprintf (mask, "%lx.%lx.%lx.%lxX", hash[0], hash[1], hash[2], hash[3]); } else { - ircsprintf (mask, "%lX.%lX.%s.%s.%s", - hash[0], hash[1], parv[parc - 3], parv[parc - 2], - parv[parc - 1]); + ircsprintf (mask, "%lx.%lx.%s.%s.%s", + hash[0], hash[1], parv2[parc2 - 3], parv2[parc2 - 2], + parv2[parc2 - 1]); } } else { - if (parc >= 4) /* There are isp's like *.isp.co.uk etc out there */ + if (parc2 >= 4) /* There are isp's like *.isp.co.uk etc out there */ { - ircsprintf (mask, "%lX.%lX.%s.%s.%s", - hash[0], hash[1], parv[parc - 3], parv[parc - 2], - parv[parc - 1]); + ircsprintf (mask, "%lx.%lx.%s.%s.%s", + hash[0], hash[1], parv2[parc2 - 3], parv2[parc2 - 2], + parv2[parc2 - 1]); } else { - ircsprintf (mask, "%lX.%lX.%s.%s", - hash[0], hash[1], parv[parc - 2], parv[parc - 1]); + ircsprintf (mask, "%lx.%lx.%s.%s", + hash[0], hash[1], parv2[parc2 - 2], parv2[parc2 - 1]); } } - if (mode == 0) - { - strncpy(host, mask, HOSTLEN); /* */ - } - return host; - - + strncpy (new, mask, HOSTLEN); + return; } - - diff --git a/src/s_conf.c b/src/s_conf.c index 80b2c8a..050d5c9 100644 --- a/src/s_conf.c +++ b/src/s_conf.c @@ -19,7 +19,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA * - * $Id: s_conf.c,v 1.9 2002/09/26 12:34:46 fishwaldo Exp $ + * $Id: s_conf.c,v 1.10 2002/10/16 05:01:53 fishwaldo Exp $ */ #include "stdinc.h" @@ -313,7 +313,7 @@ report_configured_links(struct Client* source_p, int mask) sendto_one(source_p, form_str(p->rpl_stats), me.name, source_p->name, c, - "*@127.0.0.1", + host, buf, name, port, diff --git a/src/s_user.c b/src/s_user.c index fa7d6d6..f7f0ee9 100644 --- a/src/s_user.c +++ b/src/s_user.c @@ -19,7 +19,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA * - * $Id: s_user.c,v 1.35 2002/10/15 03:25:37 fishwaldo Exp $ + * $Id: s_user.c,v 1.36 2002/10/16 05:01:53 fishwaldo Exp $ */ #include "stdinc.h" @@ -462,7 +462,7 @@ register_local_user(struct Client *client_p, struct Client *source_p, SetHidden(source_p); - make_virthost(source_p->host, source_p->vhost, 0); + make_virthost(source_p->host, source_p->localClient->sockhost, source_p->vhost); Count.invisi++; @@ -1046,8 +1046,11 @@ user_mode(struct Client *client_p, struct Client *source_p, int parc, char *parv /* if they are already hidden, don't hide them again * of they are not a local client */ - SetHidden(target_p); - make_virthost(target_p->host, target_p->vhost, 0); + if (MyClient(target_p)) { + SetHidden(target_p); + make_virthost(target_p->host, target_p->localClient->sockhost, target_p->vhost); + sendto_server(NULL, target_p, NULL, 0, 0, LL_ICLIENT, ":%s SETHOST %s :%s", me.name, target_p->name, target_p->vhost); + } } else { ClearHidden(target_p); strncpy(target_p->vhost, target_p->host, HOSTLEN);