1 /* +------------------------------------+
2 * | Inspire Internet Relay Chat Daemon |
3 * +------------------------------------+
5 * InspIRCd: (C) 2002-2007 InspIRCd Development Team
6 * See: http://www.inspircd.org/wiki/index.php/Credits
8 * This program is free but copyrighted software; see
9 * the file COPYING for details.
11 * ---------------------------------------------------
15 #include "commands/cmd_userhost.h"
17 extern "C" DllExport command_t* init_command(InspIRCd* Instance)
19 return new cmd_userhost(Instance);
22 CmdResult cmd_userhost::Handle (const char** parameters, int pcnt, userrec *user)
24 std::string retbuf = std::string("302 ") + user->nick + " :";
27 for (int i = 0; i < pcnt; i++)
29 userrec *u = ServerInstance->FindNick(parameters[i]);
31 if ((u) && (u->registered == REG_ALL))
33 retbuf = retbuf + u->nick;
37 retbuf = retbuf + "*=+";
41 retbuf = retbuf + "=+";
44 retbuf = retbuf + u->ident + "@";
48 retbuf = retbuf + u->host;
52 retbuf = retbuf + u->dhost;
55 retbuf = retbuf + " ";
59 user->WriteServ(retbuf);