* +------------------------------------+
*
* InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://www.inspircd.org/wiki/index.php/Credits
+ * See: http://wiki.inspircd.org/Credits
*
* This program is free but copyrighted software; see
* the file COPYING for details.
CmdResult Handle (const std::vector<std::string> ¶meters, User *user)
{
std::string retbuf = std::string("340 ") + user->nick + " :";
+ int nicks = 0;
for (int i = 0; i < (int)parameters.size(); i++)
{
else
retbuf += "+";
retbuf += u->ident + "@" + u->GetIPString() + " ";
+ nicks++;
}
}
- user->WriteServ(retbuf);
+ if (nicks != 0)
+ user->WriteServ(retbuf);
/* Dont send to the network */
return CMD_LOCALONLY;
class ModuleUserIP : public Module
{
- CommandUserip* mycommand;
+ CommandUserip cmd;
public:
ModuleUserIP(InspIRCd* Me)
- : Module(Me)
+ : Module(Me), cmd(Me)
{
-
- mycommand = new CommandUserip(ServerInstance);
- ServerInstance->AddCommand(mycommand);
+ ServerInstance->AddCommand(&cmd);
Implementation eventlist[] = { I_On005Numeric };
ServerInstance->Modules->Attach(eventlist, this, 1);
}