X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fcommands%2Fcmd_userhost.cpp;h=a080d01f2e870bc5bdc92d661d78010f20c5a544;hb=1200d6285b1d64699c6fa2c8241e2ee40f52d2a3;hp=d6b34456f29f2d993c2a326ad1df004ff22ab869;hpb=e4acbc95b8b6cd5b28d38a2242c02e8ff4991e4a;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/commands/cmd_userhost.cpp b/src/commands/cmd_userhost.cpp index d6b34456f..a080d01f2 100644 --- a/src/commands/cmd_userhost.cpp +++ b/src/commands/cmd_userhost.cpp @@ -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; }