1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-06 23:43:13 +02:00

More local->ip & INET6 stuff removed.

This commit is contained in:
Bram Matthys
2015-07-28 14:14:52 +02:00
parent 80147b2914
commit 8e30acda41
4 changed files with 5 additions and 16 deletions
+1 -1
View File
@@ -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 */
+1 -6
View File
@@ -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;
+1 -3
View File
@@ -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 != '*')
+2 -6
View File
@@ -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);