m_userhost: hide user's own IP if iline spoofed
This commit is contained in:
parent
d5e424bcff
commit
f1d265d177
1 changed files with 2 additions and 8 deletions
|
@ -76,20 +76,14 @@ m_userhost(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *sour
|
||||||
|
|
||||||
if((target_p = find_person(parv[i])) != NULL)
|
if((target_p = find_person(parv[i])) != NULL)
|
||||||
{
|
{
|
||||||
/*
|
if (MyClient(target_p) && target_p == source_p)
|
||||||
* Show real IP for USERHOST on yourself.
|
|
||||||
* This is needed for things like mIRC, which do a server-based
|
|
||||||
* lookup (USERHOST) to figure out what the clients' local IP
|
|
||||||
* is. Useful for things like NAT, and dynamic dial-up users.
|
|
||||||
*/
|
|
||||||
if(MyClient(target_p) && (target_p == source_p))
|
|
||||||
{
|
{
|
||||||
rl = sprintf(response, "%s%s=%c%s@%s ",
|
rl = sprintf(response, "%s%s=%c%s@%s ",
|
||||||
target_p->name,
|
target_p->name,
|
||||||
SeesOper(target_p, source_p) ? "*" : "",
|
SeesOper(target_p, source_p) ? "*" : "",
|
||||||
(target_p->user->away) ? '-' : '+',
|
(target_p->user->away) ? '-' : '+',
|
||||||
target_p->username,
|
target_p->username,
|
||||||
target_p->sockhost);
|
IsIPSpoof(target_p) ? target_p->orighost : target_p->sockhost);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue