From a8c3bbb15d8dc1390864612f6d89c5015ad8366d Mon Sep 17 00:00:00 2001 From: frostycoolslug Date: Thu, 8 Apr 2004 18:40:13 +0000 Subject: Working /helpop command module git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@459 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_helpop.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/modules/m_helpop.cpp b/src/modules/m_helpop.cpp index 62dc799d8..750362a51 100644 --- a/src/modules/m_helpop.cpp +++ b/src/modules/m_helpop.cpp @@ -32,8 +32,9 @@ void handle_helpop(char **parameters, int pcnt, userrec *user) { snprintf(a,MAXBUF,"line%d",i); output = helpop->ReadValue("nohelp", std::string(a), 0); - // Send line to client.. - Srv->SendTo(NULL,user,"290 "+std::string(user->nick)+" :"+output); + if(output != "") { + Srv->SendTo(NULL,user,"290 "+std::string(user->nick)+" :"+output); + } } } } else if (strchr(user->modes,'o')) { @@ -47,8 +48,9 @@ void handle_helpop(char **parameters, int pcnt, userrec *user) { snprintf(a,MAXBUF,"line%d",i); output = helpop->ReadValue("nohelpo", std::string(a), 0); - // Send line to client.. - Srv->SendTo(NULL,user,"290 "+std::string(user->nick)+" :"+output); + if (output != "") { + Srv->SendTo(NULL,user,"290 "+std::string(user->nick)+" :"+output); + } } // Forward. sendtohelpop(user, pcnt, parameters); @@ -80,8 +82,9 @@ bool do_helpop(char **parameters, int pcnt, userrec *src) { snprintf(a,MAXBUF,"line%d",i); output = helpop->ReadValue(std::string(search), std::string(a), 0); - // Send line to client.. - Srv->SendTo(NULL,src,"290 "+std::string(src->nick)+" :"+output); + if (output != "") { + Srv->SendTo(NULL,src,"290 "+std::string(src->nick)+" :"+output); + } } return true; } @@ -209,4 +212,3 @@ extern "C" void * init_module( void ) { return new ModuleHelpopFactory; } - -- cgit v1.2.3