summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRobin Burchell w00t@inspircd.org <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864>2008-11-06 23:50:03 +0000
committerRobin Burchell w00t@inspircd.org <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864>2008-11-06 23:50:03 +0000
commit9e9ec919ec2e10ae262ec6402f1af3a0171d5444 (patch)
tree22e2e4e1d1d25996bf1697811382d38ada5064a1 /include
parent4171f140c237f6384ddd55f6015678ef270df7e4 (diff)
Add proper constructor, move Module::name to be string.. still doesn't compile, of course, as this still needs a lot more renovation.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1568 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'include')
-rw-r--r--include/modules.h8
-rw-r--r--include/services.h4
2 files changed, 6 insertions, 6 deletions
diff --git a/include/modules.h b/include/modules.h
index 2fe37f9c2..31cf9bf0a 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -136,7 +136,7 @@ class Module
{
public:
// XXX :(
- char *name;
+ std::string name;
char *filename;
void *handle;
time_t time;
@@ -159,7 +159,7 @@ class Module
/** Creates and initialises a new module.
* @param loadernick The nickname of the user loading the module.
*/
- Module(const std::string &loadernick);
+ Module(const std::string &modname, const std::string &loadernick);
/** Destroys a module, freeing resources it has allocated.
*/
@@ -333,7 +333,7 @@ EvtMessage *findEventHandler(EvtMessageHash * msgEvtTable[], const char *name);
int addCoreEventHandler(EvtMessageHash * msgEvtTable[], EvtMessage * evm);
MDE int moduleAddEventHandler(EvtMessage * evm);
MDE int moduleEventDelHandler(char *name);
-int delEventHandler(EvtMessageHash * msgEvtTable[], EvtMessage * evm, char *mod_name);
+int delEventHandler(EvtMessageHash * msgEvtTable[], EvtMessage * evm, const char *mod_name);
int destroyEventHandler(EvtMessage * evm);
int addEventHandler(EvtMessageHash * msgEvtTable[], EvtMessage * evm);
@@ -342,7 +342,7 @@ EvtHook *findEventHook(EvtHookHash * HookEvtTable[], const char *name);
int addCoreEventHook(EvtHookHash * HookEvtTable[], EvtHook * evh);
MDE int moduleAddEventHook(EvtHook * evh);
MDE int moduleEventDelHook(const char *name);
-int delEventHook(EvtHookHash * HookEvtTable[], EvtHook * evh, char *mod_name);
+int delEventHook(EvtHookHash * HookEvtTable[], EvtHook * evh, const char *mod_name);
int destroyEventHook(EvtHook * evh);
MDE void moduleInsertLanguage(int langNumber, int ac, const char **av);
diff --git a/include/services.h b/include/services.h
index 347e48d3d..f1113fbfc 100644
--- a/include/services.h
+++ b/include/services.h
@@ -189,7 +189,7 @@ extern int strncasecmp(const char *, const char *, size_t);
*/
#ifdef _WIN32
#define MODULE_INIT(y) \
- extern "C" DllExport Module *init_module(const std::string &creator) \
+ extern "C" DllExport Module *init_module(const std::string &modname, const std::string &creator) \
{ \
return new y(creator); \
} \
@@ -205,7 +205,7 @@ extern int strncasecmp(const char *, const char *, size_t);
}
#else
#define MODULE_INIT(y) \
- extern "C" DllExport Module *init_module(const std::string &creator) \
+ extern "C" DllExport Module *init_module(const std::string &modname, const std::string &creator) \
{ \
return new y(creator); \
}