X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fcommands%2Fcmd_userhost.cpp;h=a080d01f2e870bc5bdc92d661d78010f20c5a544;hb=1200d6285b1d64699c6fa2c8241e2ee40f52d2a3;hp=94f406c315eec5b40e0304e25de416b5d7e3b6bb;hpb=5d5285f24b1fe306faa2a6d0565ba1cff0f17f11;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/commands/cmd_userhost.cpp b/src/commands/cmd_userhost.cpp index 94f406c31..a080d01f2 100644 --- a/src/commands/cmd_userhost.cpp +++ b/src/commands/cmd_userhost.cpp @@ -2,7 +2,7 @@ * | Inspire Internet Relay Chat Daemon | * +------------------------------------+ * - * InspIRCd: (C) 2002-2007 InspIRCd Development Team + * InspIRCd: (C) 2002-2008 InspIRCd Development Team * See: http://www.inspircd.org/wiki/index.php/Credits * * This program is free but copyrighted software; see @@ -19,12 +19,12 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance) return new CommandUserhost(Instance); } -CmdResult CommandUserhost::Handle (const char** parameters, int pcnt, User *user) +CmdResult CommandUserhost::Handle (const std::vector& parameters, User *user) { std::string retbuf = std::string("302 ") + user->nick + " :"; - for (int i = 0; i < pcnt; i++) + for (unsigned int i = 0; i < parameters.size(); i++) { User *u = ServerInstance->FindNick(parameters[i]); @@ -34,16 +34,21 @@ CmdResult CommandUserhost::Handle (const char** parameters, int pcnt, User *user 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)) + if (user->HasPrivPermission("users/auspex")) { retbuf = retbuf + u->host; }