* ---------------------------------------------------
*/
-#include "users.h"
-#include "channels.h"
-#include "modules.h"
#include "inspircd.h"
/* $ModDesc: Provides support for unreal-style channel mode +z */
public:
SSLMode(InspIRCd* Instance) : ModeHandler(Instance, 'z', 0, 0, false, MODETYPE_CHANNEL, false) { }
- ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string ¶meter, bool adding)
+ ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding)
{
if (adding)
{
sslm = new SSLMode(ServerInstance);
- if (!ServerInstance->AddMode(sslm, 'z'))
+ if (!ServerInstance->AddMode(sslm))
throw ModuleException("Could not add new modes!");
}
List[I_OnUserPreJoin] = 1;
}
- virtual int OnUserPreJoin(userrec* user, chanrec* chan, const char* cname, std::string &privs)
+ virtual int OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs)
{
if(chan && chan->IsModeSet('z'))
{
};
-class ModuleSSLModesFactory : public ModuleFactory
-{
- public:
- ModuleSSLModesFactory()
- {
- }
-
- ~ModuleSSLModesFactory()
- {
- }
-
- virtual Module* CreateModule(InspIRCd* Me)
- {
- return new ModuleSSLModes(Me);
- }
-
-};
-
+MODULE_INIT(ModuleSSLModes)
-extern "C" DllExport void * init_module( void )
-{
- return new ModuleSSLModesFactory;
-}