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 * ---------------------------------------------------
16 #include "commands/cmd_userhost.h"
20 extern "C" DllExport command_t* init_command(InspIRCd* Instance)
22 return new cmd_userhost(Instance);
25 CmdResult cmd_userhost::Handle (const char** parameters, int pcnt, userrec *user)
27 std::string retbuf = std::string("302 ") + user->nick + " :";
30 for (int i = 0; i < pcnt; i++)
32 userrec *u = ServerInstance->FindNick(parameters[i]);
34 if ((u) && (u->registered == REG_ALL))
36 retbuf = retbuf + " ";
40 retbuf = retbuf + "*=+";
44 retbuf = retbuf + "=+";
47 retbuf = retbuf + u->ident + "@";
51 retbuf = retbuf + u->host;
55 retbuf = retbuf + u->dhost;
60 user->WriteServ(retbuf);