From fad4a47bc6e17df10b04dad6066d971e936dcc55 Mon Sep 17 00:00:00 2001 From: w00t Date: Tue, 30 Jan 2007 19:50:35 +0000 Subject: 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 --- src/modules/m_helpop.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src') 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 = ""; } 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); -- cgit v1.2.3