From bfde79e41d43f986f685c72a27bdc61b1affe0ac Mon Sep 17 00:00:00 2001 From: Bram Matthys Date: Mon, 31 May 2004 18:49:26 +0000 Subject: [PATCH] - And another one, should be fixed now. --- Changes | 1 + include/h.h | 2 +- src/s_user.c | 2 +- src/support.c | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Changes b/Changes index 7f0b39556..1298b1456 100644 --- a/Changes +++ b/Changes @@ -3221,3 +3221,4 @@ This is the 3.2 fixes branch. - Made socket errors correctly reported under Win32. Thanks to Microsoft for deciding that having a way to get a socket error string was unnecessary. - Fixed a NICKIP bug regarding passing along IPs (#0001846) reported by Troco +- And another one, should be fixed now. diff --git a/include/h.h b/include/h.h index 08bb6efaa..3ef88dfe9 100644 --- a/include/h.h +++ b/include/h.h @@ -212,7 +212,7 @@ extern void get_sockhost(aClient *, char *); #ifndef _WIN32 extern char *strerror(int); #else -extern __declspec(dllexport) char *sock_strerror(int); +extern MODFUNC char *sock_strerror(int); #endif extern int dgets(int, char *, int); extern char *inetntoa(char *); diff --git a/src/s_user.c b/src/s_user.c index 62a85b14d..1367254d1 100644 --- a/src/s_user.c +++ b/src/s_user.c @@ -1089,7 +1089,7 @@ extern int register_user(aClient *cptr, aClient *sptr, char *nick, char *usernam /* Here pig.. yeah you .. -Stskeeps */ sptr->user->virthost = strdup(virthost); } - if (ip) + if (ip && (*ip != '*')) sptr->user->ip_str = strdup(decode_ip(ip)); } diff --git a/src/support.c b/src/support.c index 61068a5e7..9f08e057b 100644 --- a/src/support.c +++ b/src/support.c @@ -1882,7 +1882,7 @@ char *decode_ip(char *buf) else if (len == 8) /* IPv4 */ return inet_ntoa(*(struct in_addr *)targ); else /* Error?? */ - return NULL; + abort(); } /* IPv6 stuff */