X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=ircd%2Fm_userip.c;h=0085a0cd15c29ef9788f6c1b658a210ffe797e85;hb=refs%2Fheads%2Fupstream;hp=52a9db7c7fb63ff303162f243c36fafc600dfc45;hpb=1e2b7e3d8432d52b6e7fd2bf486edc35b2e58e7b;p=ircu2.10.12-pk.git diff --git a/ircd/m_userip.c b/ircd/m_userip.c index 52a9db7..0085a0c 100644 --- a/ircd/m_userip.c +++ b/ircd/m_userip.c @@ -85,12 +85,13 @@ #include "ircd_reply.h" #include "ircd_string.h" #include "ircd_features.h" +#include "ircd_log.h" #include "msgq.h" #include "numeric.h" #include "s_user.h" #include "struct.h" -#include +/* #include -- Now using assert in ircd_log.h */ static void userip_formatter(struct Client* cptr, struct Client *sptr, struct MsgBuf* mb) { @@ -98,9 +99,15 @@ static void userip_formatter(struct Client* cptr, struct Client *sptr, struct Ms msgq_append(0, mb, "%s%s=%c%s@%s", cli_name(cptr), SeeOper(sptr,cptr) ? "*" : "", cli_user(cptr)->away ? '-' : '+', cli_user(cptr)->username, - HasHiddenHost(cptr) && !IsAnOper(sptr) ? + /* Do not *EVER* change this to give opers the real IP. + * Too many scripts rely on this data and can inadvertently + * publish the user's real IP, thus breaking the security + * of +x. If an oper wants the real IP, he should go to + * /whois to get it. + */ + HasHiddenHost(cptr) && (sptr != cptr) ? feature_str(FEAT_HIDDEN_IP) : - ircd_ntoa((const char*) &(cli_ip(cptr)))); + ircd_ntoa(&cli_ip(cptr))); } /*