X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_userip.cpp;h=7ffeb383a1fbe4b7ab7adc5d7600e83bb1a8ef20;hb=92796ffe6430162a9cb70f1361aaa9ca64645c90;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..7ffeb383a 100644 --- a/src/modules/m_userip.cpp +++ b/src/modules/m_userip.cpp @@ -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;