* ---------------------------------------------------
*/
-#include "users.h"
-#include "channels.h"
-#include "modules.h"
#include "inspircd.h"
#include "wildcard.h"
/** Handle /CHECK
*/
-class cmd_check : public command_t
+class CommandCheck : public Command
{
public:
- cmd_check (InspIRCd* Instance) : command_t(Instance,"CHECK", 'o', 1)
+ CommandCheck (InspIRCd* Instance) : Command(Instance,"CHECK", 'o', 1)
{
this->source = "m_check.so";
syntax = "<nickname>|<ip>|<hostmask>|<channel>";
}
- CmdResult Handle (const char** parameters, int pcnt, userrec *user)
+ CmdResult Handle (const char** parameters, int pcnt, User *user)
{
- userrec *targuser;
- chanrec *targchan;
+ User *targuser;
+ Channel *targchan;
std::string checkstr;
std::string chliststr;
class ModuleCheck : public Module
{
private:
- cmd_check *mycommand;
+ CommandCheck *mycommand;
public:
ModuleCheck(InspIRCd* Me) : Module(Me)
{
- mycommand = new cmd_check(ServerInstance);
+ mycommand = new CommandCheck(ServerInstance);
ServerInstance->AddCommand(mycommand);
}
};
-
-
-class ModuleCheckFactory : public ModuleFactory
-{
- public:
- ModuleCheckFactory()
- {
- }
-
- ~ModuleCheckFactory()
- {
- }
-
- virtual Module * CreateModule(InspIRCd* Me)
- {
- return new ModuleCheck(Me);
- }
-
-};
-
-extern "C" DllExport void * init_module( void )
-{
- return new ModuleCheckFactory;
-}
-
+MODULE_INIT(ModuleCheck)