*/
#include "inspircd.h"
-#include "users.h"
-#include "channels.h"
-#include "modules.h"
-#include "mode.h"
#include "u_listmode.h"
#include "wildcard.h"
be = new BanException(ServerInstance);
if (!ServerInstance->AddMode(be, 'e'))
throw ModuleException("Could not add new modes!");
- ServerInstance->PublishInterface("ChannelBanList", this);
+ ServerInstance->Modules->PublishInterface("ChannelBanList", this);
}
virtual void Implements(char* List)
virtual ~ModuleBanException()
{
ServerInstance->Modes->DelMode(be);
- DELETE(be);
- ServerInstance->UnpublishInterface("ChannelBanList", this);
+ delete be;
+ ServerInstance->Modules->UnpublishInterface("ChannelBanList", this);
}
};
-class ModuleBanExceptionFactory : public ModuleFactory
-{
- public:
- ModuleBanExceptionFactory()
- {
- }
-
- ~ModuleBanExceptionFactory()
- {
- }
-
- virtual Module* CreateModule(InspIRCd* Me)
- {
- return new ModuleBanException(Me);
- }
-};
-
-
-extern "C" DllExport void * init_module( void )
-{
- return new ModuleBanExceptionFactory;
-}
-
+MODULE_INIT(ModuleBanException)