* ---------------------------------------------------
*/
-#include <stdio.h>
-#include <vector>
-#include "users.h"
-#include "channels.h"
#include "inspircd.h"
-#include "modules.h"
#include "wildcard.h"
/* $ModDesc: Sets (and unsets) modes on users when they connect */
if ((match(user->GetIPString(),hostn.c_str(),true)) || (match(user->host,hostn.c_str())))
{
std::string ThisModes = Conf->ReadValue("connect","modes",j);
- if (ThisModes != "")
+ if (!ThisModes.empty())
{
std::string buf;
stringstream ss(ThisModes);
}
};
-// stuff down here is the module-factory stuff. For basic modules you can ignore this.
-
-class ModuleModesOnConnectFactory : public ModuleFactory
-{
- public:
- ModuleModesOnConnectFactory()
- {
- }
-
- ~ModuleModesOnConnectFactory()
- {
- }
-
- virtual Module * CreateModule(InspIRCd* Me)
- {
- return new ModuleModesOnConnect(Me);
- }
-
-};
-
-
-extern "C" DllExport void * init_module( void )
-{
- return new ModuleModesOnConnectFactory;
-}
-
+MODULE_INIT(ModuleModesOnConnect)