X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_userip.cpp;h=00db26595490d6e7bdda2ca71719e01cc932955e;hb=8be88f3e732e7a40f2e501c5e5b78c7f1b999f2d;hp=12cfd0606953db7dd5378a46a47fe52d245d81e5;hpb=43847ec9c7e1a195163eb4c529f1c92fd1ace0a4;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_userip.cpp b/src/modules/m_userip.cpp index 12cfd0606..00db26595 100644 --- a/src/modules/m_userip.cpp +++ b/src/modules/m_userip.cpp @@ -3,7 +3,7 @@ * +------------------------------------+ * * 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. @@ -29,6 +29,7 @@ class CommandUserip : public Command CmdResult Handle (const std::vector ¶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;