mirror of
https://github.com/pissnet/pissircd.git
synced 2025-08-13 05:31:36 +01:00
done with ip move.
This commit is contained in:
parent
173b643412
commit
9baffb1b30
6 changed files with 15 additions and 17 deletions
|
@ -1427,7 +1427,7 @@ int _register_user(aClient *cptr, aClient *sptr, char *nick, char *username, cha
|
|||
sptr->user->virthost = strdup(virthost);
|
||||
}
|
||||
if (ip && (*ip != '*'))
|
||||
sptr->user->ip_str = strdup(decode_ip(ip));
|
||||
sptr->ip = strdup(decode_ip(ip));
|
||||
}
|
||||
|
||||
hash_check_watch(sptr, RPL_LOGON); /* Uglier hack */
|
||||
|
|
|
@ -189,8 +189,8 @@ DLLFUNC CMD_FUNC(m_user)
|
|||
* 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->user->ip_str)
|
||||
sptr->user->ip_str = strdup(Inet_ia2p(&sptr->local->ip));
|
||||
if (!sptr->ip)
|
||||
sptr->ip = strdup(Inet_ia2p(&sptr->local->ip));
|
||||
sptr->user->server = me_hash;
|
||||
user_finish:
|
||||
if (sstamp != NULL && *sstamp != '*')
|
||||
|
|
|
@ -486,7 +486,7 @@ char has_common_chan = 0;
|
|||
{
|
||||
char *ip;
|
||||
|
||||
ip = acptr->user->ip_str;
|
||||
ip = acptr->ip;
|
||||
if (!ip)
|
||||
return WHO_CANTSEE;
|
||||
|
||||
|
@ -713,7 +713,7 @@ int oper = IsOper(sptr);
|
|||
goto matchok;
|
||||
if (IsHidden(acptr) && !match(mask, acptr->user->virthost))
|
||||
goto matchok;
|
||||
if (acptr->user->ip_str && !match(mask, acptr->user->ip_str))
|
||||
if (acptr->ip && !match(mask, acptr->ip))
|
||||
goto matchok;
|
||||
/* nothing matched... */
|
||||
continue;
|
||||
|
@ -768,8 +768,7 @@ static void send_who_reply(aClient *sptr, aClient *acptr,
|
|||
if (who_flags & WF_REALHOST)
|
||||
host = acptr->user->realhost;
|
||||
else if (who_flags & WF_IP)
|
||||
host = (acptr->user->ip_str ? acptr->user->ip_str :
|
||||
acptr->user->realhost);
|
||||
host = (acptr->ip ? acptr->ip : acptr->user->realhost);
|
||||
else
|
||||
host = GetHost(acptr);
|
||||
}
|
||||
|
|
|
@ -168,7 +168,7 @@ DLLFUNC int m_whois(aClient *cptr, aClient *sptr, int parc, char *parv[])
|
|||
sendto_one(sptr, rpl_str(RPL_WHOISHOST),
|
||||
me.name, sptr->name, acptr->name,
|
||||
(MyConnect(acptr) && strcmp(acptr->username, "unknown")) ? acptr->username : "*",
|
||||
acptr->user->realhost, acptr->user->ip_str ? acptr->user->ip_str : "");
|
||||
acptr->user->realhost, acptr->ip ? acptr->ip : "");
|
||||
}
|
||||
|
||||
if (IsARegNick(acptr))
|
||||
|
|
|
@ -336,9 +336,8 @@ int dowebirc(aClient *cptr, char *ip, char *host)
|
|||
if (cptr->user)
|
||||
{
|
||||
/* Kinda unsure if this is actually used.. But maybe if USER, PASS, NICK ? */
|
||||
if (cptr->user->ip_str)
|
||||
MyFree(cptr->user->ip_str);
|
||||
cptr->user->ip_str = strdup(ip);
|
||||
safefree(cptr->ip);
|
||||
cptr->ip = strdup(ip);
|
||||
}
|
||||
|
||||
/* STEP 3: Update cptr->local->hostp */
|
||||
|
|
12
src/send.c
12
src/send.c
|
@ -1252,7 +1252,7 @@ void sendto_fconnectnotice(aClient *acptr, int disconnect, char *comment)
|
|||
acptr->user->server, acptr->name, acptr->user->username, acptr->user->realhost);
|
||||
ircsnprintf(connecth, sizeof(connecth),
|
||||
"*** Notice -- Client connecting at %s: %s (%s@%s) [%s] {0}", acptr->user->server, acptr->name,
|
||||
acptr->user->username, acptr->user->realhost, acptr->user->ip_str ? acptr->user->ip_str : "0");
|
||||
acptr->user->username, acptr->user->realhost, acptr->ip ? acptr->ip : "0");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1260,7 +1260,7 @@ void sendto_fconnectnotice(aClient *acptr, int disconnect, char *comment)
|
|||
acptr->user->server, acptr->name, acptr->user->username, acptr->user->realhost, comment);
|
||||
ircsnprintf(connecth, sizeof(connecth), "*** Notice -- Client exiting at %s: %s (%s@%s) [%s] [%s]",
|
||||
acptr->user->server, acptr->name, acptr->user->username, acptr->user->realhost, comment,
|
||||
acptr->user->ip_str ? acptr->user->ip_str : "0");
|
||||
acptr->ip ? acptr->ip : "0");
|
||||
}
|
||||
|
||||
list_for_each_entry(cptr, &oper_list, special_node)
|
||||
|
@ -1305,14 +1305,14 @@ void sendto_serv_butone_nickcmd(aClient *one, aClient *sptr,
|
|||
":%s UID %s %d %ld %s %s %s %s %s %s %s %s :%s",
|
||||
sptr->srvptr->id, nick, hopcount, lastnick, username,
|
||||
realhost, sptr->id, svid, umodes, vhost, getcloak(sptr),
|
||||
encode_ip(sptr->user->ip_str), info);
|
||||
encode_ip(sptr->ip), info);
|
||||
}
|
||||
|
||||
sendto_server(one, PROTO_NICKv2 | PROTO_VHP, *sptr->id ? PROTO_SID : 0,
|
||||
"NICK %s %d %ld %s %s %s %s %s %s %s %s :%s",
|
||||
nick, hopcount, lastnick, username,
|
||||
realhost, server, svid, umodes, vhost, getcloak(sptr),
|
||||
encode_ip(sptr->user->ip_str), info);
|
||||
encode_ip(sptr->ip), info);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1348,7 +1348,7 @@ void sendto_one_nickcmd(aClient *cptr, aClient *sptr, char *umodes)
|
|||
sptr->srvptr->id, sptr->name, sptr->hopcount, sptr->lastnick,
|
||||
sptr->user->username, sptr->user->realhost, sptr->id,
|
||||
sptr->user->svid, umodes, vhost, getcloak(sptr),
|
||||
encode_ip(sptr->user->ip_str), sptr->info);
|
||||
encode_ip(sptr->ip), sptr->info);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1358,7 +1358,7 @@ void sendto_one_nickcmd(aClient *cptr, aClient *sptr, char *umodes)
|
|||
sptr->hopcount+1, sptr->lastnick, sptr->user->username,
|
||||
sptr->user->realhost, sptr->srvptr->name,
|
||||
sptr->user->svid, umodes, vhost,
|
||||
encode_ip(sptr->user->ip_str),
|
||||
encode_ip(sptr->ip),
|
||||
sptr->info);
|
||||
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue