virtual int OnUserRegister(userrec* user)
{
- if ((allowpattern != "") && (ServerInstance->MatchText(user->nick,allowpattern)))
+ if ((!allowpattern.empty()) && (ServerInstance->MatchText(user->nick,allowpattern)))
{
user->Extend("sqlauthed");
return 0;
};
-class ModuleSQLAuthFactory : public ModuleFactory
-{
- public:
- ModuleSQLAuthFactory()
- {
- }
-
- ~ModuleSQLAuthFactory()
- {
- }
-
- virtual Module * CreateModule(InspIRCd* Me)
- {
- return new ModuleSQLAuth(Me);
- }
-
-};
-
+MODULE_INIT(ModuleSQLAuth);
-extern "C" void * init_module( void )
-{
- return new ModuleSQLAuthFactory;
-}