* ---------------------------------------------------
*/
+#include "inspircd.h"
#include "users.h"
#include "channels.h"
#include "modules.h"
-#include "inspircd.h"
/* $ModDesc: Provides support for oper-only chans via the +O channel mode */
OperChans* oc;
public:
ModuleOperChans(InspIRCd* Me)
- : Module::Module(Me)
+ : Module(Me)
{
oc = new OperChans(ServerInstance);
virtual int OnUserPreJoin(userrec* user, chanrec* chan, const char* cname, std::string &privs)
{
- if (!*user->oper)
+ if (!IS_OPER(user))
{
if (chan)
{
return 0;
}
- virtual ~ModuleOperChans()
+ virtual ~ModuleOperChans()
{
ServerInstance->Modes->DelMode(oc);
DELETE(oc);
};
-extern "C" void * init_module( void )
+extern "C" DllExport void * init_module( void )
{
return new ModuleOperChansFactory;
}