summaryrefslogtreecommitdiff
path: root/src/modules/m_opermodes.cpp
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2007-05-19 15:56:42 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2007-05-19 15:56:42 +0000
commit9cf56d917d92959701694477f7944d45ad2c38ed (patch)
treea379ee905e7485c2ee825790720ed2b69ba127d1 /src/modules/m_opermodes.cpp
parent3bbb36695383badf5b3ba0ecba070f16094ae51d (diff)
Windows support. Tested and working to compile on freebsd and linux. Next step is to make sure it actually works in windows too. ;p. Add Burlex to contributors.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7043 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_opermodes.cpp')
-rw-r--r--src/modules/m_opermodes.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/modules/m_opermodes.cpp b/src/modules/m_opermodes.cpp
index 43c271c3d..30f6fef9c 100644
--- a/src/modules/m_opermodes.cpp
+++ b/src/modules/m_opermodes.cpp
@@ -29,7 +29,7 @@ class ModuleModesOnOper : public Module
public:
ModuleModesOnOper(InspIRCd* Me)
- : Module::Module(Me)
+ : Module(Me)
{
Conf = new ConfigReader(ServerInstance);
@@ -82,7 +82,7 @@ class ModuleModesOnOper : public Module
tokens.push_back(buf);
int size = tokens.size() + 1;
- const char* modes[size];
+ char** modes = new char*[size];
modes[0] = user->nick;
modes[1] = (char*)tokens[0].c_str();
@@ -103,7 +103,8 @@ class ModuleModesOnOper : public Module
n.push_back(modes[j]);
}
rmode.Send(ServerInstance);
- ServerInstance->SendMode(modes, size, user);
+ ServerInstance->SendMode((const char**)modes, size, user);
+ delete [] modes;
}
break;
}
@@ -132,7 +133,7 @@ class ModuleModesOnOperFactory : public ModuleFactory
};
-extern "C" void * init_module( void )
+extern "C" DllExport void * init_module( void )
{
return new ModuleModesOnOperFactory;
}