Explorar el Código

* Removed inet_ntoa
* Changed help for cmd_pls_user somewhat


svn: 820

Bryan Drewery hace 22 años
padre
commit
382c93c74c
Se han modificado 4 ficheros con 6 adiciones y 4 borrados
  1. 1 1
      autotools/configure.ac
  2. 2 1
      misc/help.txt
  3. 1 1
      src/cmds.c
  4. 2 1
      src/net.c

+ 1 - 1
autotools/configure.ac

@@ -133,7 +133,7 @@ AC_CHECK_FUNCS([strcasecmp strncasecmp vsnprintf])
 
 #autoscan suggested this....
 #These are recommended by autoscan, but no code supports it currently
-#AC_CHECK_FUNCS([alarm bzero dup2 getcwd gethostbyaddr gethostbyname gethostname getpass gettimeofday inet_ntoa mbrlen
+#AC_CHECK_FUNCS([alarm bzero dup2 getcwd gethostbyaddr gethostbyname gethostname getpass gettimeofday mbrlen
 #mkdir munmap realpath select setlocale socket strchr strerror strpbrk strrchr strstr strtol tzset])
 
 EGG_CHECK_FUNC_VSPRINTF

+ 2 - 1
misc/help.txt

@@ -51,9 +51,10 @@ See also: -ignore, ignores
  
 See also: invites, -invite, stick, unstick
 ::+user
-###  %b+user%b <handle> [hostmask]
+###  %b+user%b <handle> [host] [anotherhost] ...
    Creates a new user record for the handle given. The new user record will
    have no flags, an optional hostmask, and a random pass/secpass.
+   List as many hosts as needed.
  
 See also: -user, +host, -host%{+ni}, newleaf%{-}
 ::-ban

+ 1 - 1
src/cmds.c

@@ -3167,7 +3167,7 @@ static void cmd_pls_user(struct userrec *u, int idx, char *par)
 
   putlog(LOG_CMDS, "*", STR("#%s# +user %s"), dcc[idx].nick, par);
   if (!par[0]) {
-    dprintf(idx, STR("Usage: +user <handle> [hostmask]\n"));
+    dprintf(idx, STR("Usage: +user <handle> [host] [anotherhost] ...\n"));
     return;
   }
   handle = newsplit(&par);

+ 2 - 1
src/net.c

@@ -931,10 +931,11 @@ char *hostnamefromip(unsigned long ip)
  */
 char *iptostr(IP ip)
 {
+  static char ipbuf[32];
   struct in_addr a;
 
   a.s_addr = ip;
-  return inet_ntoa(a);
+  return (char *)inet_ntop(AF_INET, &a, ipbuf, sizeof(ipbuf));
 }
 
 /* Short routine to answer a connect received on a socket made previously