mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-11 11:39:02 -04:00
Fix for bug #652, reported by Ankit: blank reply from /userip with no target online. Thanks!
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10941 e03df62e-2008-0410-955e-edbf42e46eb7
This commit is contained in:
parent
67b482682e
commit
6f7164eb0a
@ -29,6 +29,7 @@ class CommandUserip : public Command
|
||||
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++)
|
||||
{
|
||||
@ -41,10 +42,12 @@ class CommandUserip : public Command
|
||||
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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user