From: w00t Date: Tue, 30 Jan 2007 19:50:35 +0000 (+0000) Subject: If no topic specified, give index help, thanks Robby X-Git-Tag: v2.0.23~5928 X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=fad4a47bc6e17df10b04dad6066d971e936dcc55;p=user%2Fhenk%2Fcode%2Finspircd.git 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 --- 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);