diff --git a/src/modules/m_nick.c b/src/modules/m_nick.c index fdb5e97b0..fba4c63a6 100644 --- a/src/modules/m_nick.c +++ b/src/modules/m_nick.c @@ -1224,7 +1224,7 @@ int _register_user(aClient *cptr, aClient *sptr, char *nick, char *username, cha */ if (*tmpstr || !*user->realhost || (isdigit(*sptr->local->sockhost) && (sptr->local->sockhost > tmpstr && isdigit(*(tmpstr - 1))) ) || (sptr->local->sockhost[0] == ':')) - strlcpy(sptr->local->sockhost, Inet_ia2p(&sptr->local->ip), sizeof(sptr->local->sockhost)); + strlcpy(sptr->local->sockhost, sptr->ip, sizeof(sptr->local->sockhost)); } strlcpy(user->realhost, sptr->local->sockhost, sizeof(sptr->local->sockhost)); /* SET HOSTNAME */ diff --git a/src/modules/m_tkl.c b/src/modules/m_tkl.c index 63307b5ce..bfd982ce3 100644 --- a/src/modules/m_tkl.c +++ b/src/modules/m_tkl.c @@ -1560,12 +1560,7 @@ int _find_tkline_match_zap_ex(aClient *cptr, aTKline **rettk) ircstp->is_ref++; ircsnprintf(msge, sizeof(msge), "ERROR :Closing Link: [%s] Z:Lined (%s)\r\n", -#ifndef INET6 - inetntoa((char *)&cptr->local->ip), lp->reason); -#else - inet_ntop(AF_INET6, (char *)&cptr->local->ip, - mydummy, MYDUMMY_SIZE), lp->reason); -#endif + acptr->ip, lp->reason); strlcpy(zlinebuf, msge, sizeof zlinebuf); if (rettk) *rettk = lp; diff --git a/src/modules/m_user.c b/src/modules/m_user.c index 346f1ab88..ba267e9a2 100644 --- a/src/modules/m_user.c +++ b/src/modules/m_user.c @@ -188,9 +188,7 @@ DLLFUNC CMD_FUNC(m_user) * this was copying user supplied data directly into user->realhost * which seemed bad. Not to say this is much better ;p. -- Syzop */ - strlcpy(sptr->user->realhost, Inet_ia2p(&sptr->local->ip), sizeof(sptr->user->realhost)); - if (!sptr->ip) - sptr->ip = strdup(Inet_ia2p(&sptr->local->ip)); + strlcpy(sptr->user->realhost, sptr->ip, sizeof(sptr->user->realhost)); sptr->user->server = me_hash; user_finish: if (sstamp != NULL && *sstamp != '*') diff --git a/src/modules/webirc.c b/src/modules/webirc.c index e77e49c60..c37bb59a3 100644 --- a/src/modules/webirc.c +++ b/src/modules/webirc.c @@ -355,12 +355,8 @@ int dowebirc(aClient *cptr, char *ip, char *host) Make sure that if this any IPv4 address is _not_ prefixed with "::ffff:" by using Inet_ia2p(). */ - sockhost = Inet_ia2p(&cptr->local->ip); - if(!sockhost) - { - return exit_client(cptr, cptr, &me, "Error processing CGI:IRC IP address."); - } - strlcpy(cptr->local->sockhost, sockhost, sizeof(cptr->local->sockhost)); + // Hmm I ignored above warning. May be bad during transition period. + strlcpy(cptr->local->sockhost, cptr->ip, sizeof(cptr->local->sockhost)); SetWEBIRC(cptr);