#include "users.h"
#include "channels.h"
#include "modules.h"
-
#include "inspircd.h"
// Global Vars
static ConfigReader *helpop;
-
-
bool do_helpop(const char**, int, userrec*);
void sendtohelpop(userrec*, int, const char**);
/* $ModDesc: /helpop Command, Works like Unreal helpop */
+/** Handles user mode +h
+ */
class Helpop : public ModeHandler
{
public:
}
};
+/** Handles /HELPOP
+ */
class cmd_helpop : public command_t
{
public:
syntax = "[?|!]<any-text>";
}
- void Handle (const char** parameters, int pcnt, userrec *user)
+ CmdResult Handle (const char** parameters, int pcnt, userrec *user)
{
char a[MAXBUF];
std::string output = " ";
if (!helpop)
- return;
+ return CMD_FAILURE;
if (pcnt < 1)
{
do_helpop(NULL,pcnt,user);
- return;
+ return CMD_SUCCESS;
}
if (*parameters[0] == '!')
sendtohelpop(user, pcnt, parameters);
}
}
+
+ return CMD_SUCCESS;
}
}
};
+/** Thrown by m_helpop
+ */
class HelpopException : public ModuleException
{
private:
virtual ~ModuleHelpop()
{
+ ServerInstance->Modes->DelMode(ho);
DELETE(conf);
DELETE(helpop);
DELETE(ho);
virtual Version GetVersion()
{
- return Version(1,0,0,1,VF_STATIC|VF_VENDOR);
+ return Version(1,0,0,1,VF_COMMON|VF_VENDOR);
}
};