From: Matthew Mondor Date: Fri, 14 Jan 2005 06:14:28 +0000 (+0000) Subject: Fixed bug related to !DO_IDENTD && NO_TILDE X-Git-Tag: rubiks-ircd-1-0-6~35 X-Git-Url: http://git.pulsar-zone.net/?a=commitdiff_plain;h=91c636c9066305036d4b1410abea8e306922a22e;p=rubiks-ircd.git Fixed bug related to !DO_IDENTD && NO_TILDE --- diff --git a/RUBIKS-CHANGES b/RUBIKS-CHANGES index fc4daab..a2ac817 100644 --- a/RUBIKS-CHANGES +++ b/RUBIKS-CHANGES @@ -7,8 +7,8 @@ rubiks-ircd-0-0-2 Based on bahamut 1.8.3 release (BAHAMUT-1-8-3) - OpenSSL (--enable-openssl in configure script) - Colored Nicknames (COLORED_NICKS in include/config.h) - Added NO_TILDE in include/config.h to prevent ~ from being prefixed - to usernames for which ident could not be retreived (useful when no ident - is wanted especially) + to usernames for which ident could not be retreived, can only be used + if DO_IDENT is unset (default for rubiks-ircd) - Added cleaning of zlib/Makefile and zlib/zconf.h which was missing in bahamut release diff --git a/include/config.h b/include/config.h index 090b37b..227ace8 100644 --- a/include/config.h +++ b/include/config.h @@ -18,7 +18,7 @@ * */ -/* $Id: config.h,v 1.6 2005/01/14 05:45:05 mmondor Exp $ */ +/* $Id: config.h,v 1.7 2005/01/14 06:14:28 mmondor Exp $ */ #ifndef __config_include__ #define __config_include__ @@ -234,7 +234,7 @@ * identd regardless of @'s in I:lines. You must still use @'s in your * I: lines to get ircd to do ident lookup even if you define this. */ -#define DO_IDENTD +#undef DO_IDENTD /* IDENTD_COMPLAIN - yell at users that don't have identd installed */ #undef IDENTD_COMPLAIN @@ -571,7 +571,8 @@ #define FAKEHOST /* NO_TILDE - * Prevent tildes to be prefixed to nicknames when identd could not be used + * Prevent tildes to be prefixed to nicknames when identd could not be used. + * Can only be used if DO_IDENTD is undefined. */ #define NO_TILDE diff --git a/src/s_user.c b/src/s_user.c index 10f5c46..d2059c0 100644 --- a/src/s_user.c +++ b/src/s_user.c @@ -21,7 +21,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: s_user.c,v 1.5 2005/01/14 05:45:06 mmondor Exp $ */ +/* $Id: s_user.c,v 1.6 2005/01/14 06:14:28 mmondor Exp $ */ #include "struct.h" #include "common.h" @@ -578,15 +578,17 @@ register_user(aClient *cptr, aClient *sptr, char *nick, char *username) if (sptr->flags & FLAGS_DOID && !(sptr->flags & FLAGS_GOTID)) { -#ifndef NO_TILDE +#if defined(DO_IDENTD) || !defined(NO_TILDE) /* because username may point to user->username */ char temp[USERLEN + 1]; strncpyzt(temp, username, USERLEN + 1); *user->username = '~'; (void) strncpy(&user->username[1], temp, USERLEN); - user->username[USERLEN] = '\0'; +#else + (void) strncpy(user->username, username, USERLEN - 1); #endif + user->username[USERLEN] = '\0'; #ifdef IDENTD_COMPLAIN /* tell them to install identd -Taner */ sendto_one(sptr, ":%s NOTICE %s :*** Notice -- It seems that you "