Ver Fonte

* Removed redundant define BADNICKCHARS
* Changed DIRMAX to PATH_MAX


svn: 1886

Bryan Drewery há 21 anos atrás
pai
commit
cb2e9c7799
3 ficheiros alterados com 3 adições e 4 exclusões
  1. 1 1
      src/cmds.c
  2. 1 2
      src/eggdrop.h
  3. 1 1
      src/mod/server.mod/servmsg.c

+ 1 - 1
src/cmds.c

@@ -3275,7 +3275,7 @@ static void cmd_pls_user(int idx, char *par)
     handle[HANDLEN] = 0;
   if (get_user_by_handle(userlist, handle))
     dprintf(idx, "Someone already exists by that name.\n");
-  else if (strchr(BADNICKCHARS, handle[0]) != NULL)
+  else if (strchr(BADHANDCHARS, handle[0]) != NULL)
     dprintf(idx, "You can't start a nick with '%c'.\n", handle[0]);
   else if (!egg_strcasecmp(handle, conf.bot->nick))
     dprintf(idx, "Hey! That's MY name!\n");

+ 1 - 2
src/eggdrop.h

@@ -37,7 +37,7 @@
 #define PACKNAMELEN     32
 
 #define UHOSTMAX    291 + NICKMAX /* 32 (ident) + 3 (\0, !, @) + NICKMAX */
-#define DIRMAX		512	/* paranoia				*/
+#define DIRMAX		PATH_MAX	/* paranoia				*/
 #define BADHANDCHARS	"-,+*=:!.@#;$%&"
 
 #define MAX_BOTS     500
@@ -52,7 +52,6 @@
 #define UHOSTLEN        UHOSTMAX + 1
 #define DIRLEN          DIRMAX + 1
 #define NOTENAMELEN     ((HANDLEN << 1) + 1)
-#define BADNICKCHARS	"-,+*=:!.@#;$%&"
 #define LISTSEPERATORS  ",=:; "
 
 

+ 1 - 1
src/mod/server.mod/servmsg.c

@@ -61,7 +61,7 @@ static int gotfake433(char *from)
 #ifdef ROLL_LEFT
         tmp = botname[0]; 
 #endif /* ROLL_LEFT */
-        if (strchr(BADNICKCHARS, tmp))
+        if (strchr(BADHANDCHARS, tmp))
           tmp = '_';
         rolls++;
 #ifdef ROLL_RIGHT