Fixed bug related to !DO_IDENTD && NO_TILDE
authorMatthew Mondor <mmondor@pulsar-zone.net>
Fri, 14 Jan 2005 06:14:28 +0000 (06:14 +0000)
committerMatthew Mondor <mmondor@pulsar-zone.net>
Fri, 14 Jan 2005 06:14:28 +0000 (06:14 +0000)
RUBIKS-CHANGES
include/config.h
src/s_user.c

index fc4daab..a2ac817 100644 (file)
@@ -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
index 090b37b..227ace8 100644 (file)
@@ -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__
  * 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
 #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
 
index 10f5c46..d2059c0 100644 (file)
@@ -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 "