summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorfrostycoolslug <frostycoolslug@e03df62e-2008-0410-955e-edbf42e46eb7>2004-04-08 18:40:13 +0000
committerfrostycoolslug <frostycoolslug@e03df62e-2008-0410-955e-edbf42e46eb7>2004-04-08 18:40:13 +0000
commita8c3bbb15d8dc1390864612f6d89c5015ad8366d (patch)
treeaa73c5c01a0ffd3185a65de064c9d11133b48bf8 /src/modules
parentb8b31a4fbf734bc7512452b7c962f5fdc6f03678 (diff)
Working /helpop command module
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@459 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_helpop.cpp16
1 files changed, 9 insertions, 7 deletions
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;
}
-