]> jfr.im git - solanum.git/blobdiff - modules/m_userhost.c
reference.conf: add drain_reason
[solanum.git] / modules / m_userhost.c
index 6b0a9ac1f0a17272056cd2c5954402f309df5df5..0199f415dbde1da8df83c1c847548c28fb9859b7 100644 (file)
@@ -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)
                {
-                       /*
-                        * 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))
+                       if (MyClient(target_p) && target_p == source_p)
                        {
                                rl = sprintf(response, "%s%s=%c%s@%s ",
                                                target_p->name,
                                                SeesOper(target_p, source_p) ? "*" : "",
                                                (target_p->user->away) ? '-' : '+',
                                                target_p->username,
-                                               target_p->sockhost);
+                                               IsIPSpoof(target_p) ? target_p->orighost : target_p->sockhost);
                        }
                        else
                        {