summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2007-01-30 19:50:35 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2007-01-30 19:50:35 +0000
commitfad4a47bc6e17df10b04dad6066d971e936dcc55 (patch)
treece23ac2b98b32d5e46151dec8c6efa917eecda8c /src/modules
parent7f811f8d54c2ee2bc9a5cb3aa1b6dc966d16a38a (diff)
If no topic specified, give index help, thanks Robby
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6460 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_helpop.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/modules/m_helpop.cpp b/src/modules/m_helpop.cpp
index 4d39f942b..492718367 100644
--- a/src/modules/m_helpop.cpp
+++ b/src/modules/m_helpop.cpp
@@ -55,17 +55,18 @@ class Helpop : public ModeHandler
class cmd_helpop : public command_t
{
public:
- cmd_helpop (InspIRCd* Instance) : command_t(Instance, "HELPOP", 0, 1)
+ cmd_helpop (InspIRCd* Instance) : command_t(Instance, "HELPOP", 0, 0)
{
this->source = "m_helpop.so";
syntax = "<any-text>";
}
CmdResult Handle (const char** parameters, int pcnt, userrec *user)
- {
- irc::string parameter = parameters[0];
+ {
+ if (pcnt > 0)
+ irc::string parameter = parameters[0];
- if (parameter == "index")
+ if (pcnt == 0 || parameter == "index")
{
/* iterate over all helpop items */
user->WriteServ("NOTICE %s :HELPOP topic index", user->nick);