From e471f12576b6b6d1a1c7d2e856998b47735d2037 Mon Sep 17 00:00:00 2001 From: w00t Date: Wed, 27 Aug 2008 18:45:15 +0000 Subject: USERHOST/USERIP fix, return '-' char, not '+' if the user is away. Thanks jilles. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10319 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/commands/cmd_userhost.cpp | 9 +++++++-- src/modules/m_userip.cpp | 7 ++++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/commands/cmd_userhost.cpp b/src/commands/cmd_userhost.cpp index 9ed8b30ab..420e7936f 100644 --- a/src/commands/cmd_userhost.cpp +++ b/src/commands/cmd_userhost.cpp @@ -34,13 +34,18 @@ CmdResult CommandUserhost::Handle (const std::vector& parameters, U if (IS_OPER(u)) { - retbuf = retbuf + "*=+"; + retbuf = retbuf + "*="; } else { - retbuf = retbuf + "=+"; + retbuf = retbuf + "="; } + if (IS_AWAY(u)) + retbuf += "-"; + else + retbuf += "+"; + retbuf = retbuf + u->ident + "@"; if (IS_OPER(user)) diff --git a/src/modules/m_userip.cpp b/src/modules/m_userip.cpp index 79ad1c9d6..77f3474f9 100644 --- a/src/modules/m_userip.cpp +++ b/src/modules/m_userip.cpp @@ -35,7 +35,12 @@ class CommandUserip : public Command User *u = ServerInstance->FindNick(parameters[i]); if ((u) && (u->registered == REG_ALL)) { - retbuf = retbuf + u->nick + (IS_OPER(u) ? "*" : "") + "=+" + u->ident + "@" + u->GetIPString() + " "; + retbuf = retbuf + u->nick + (IS_OPER(u) ? "*" : "") + "="; + if (IS_AWAY(u)) + retbuf += "-"; + else + retbuf += "+"; + retbuf += u->ident + "@" + u->GetIPString() + " "; } } -- cgit v1.2.3