summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changes1
-rw-r--r--src/modules.c25
-rw-r--r--version.log6
3 files changed, 26 insertions, 6 deletions
diff --git a/Changes b/Changes
index d71de8a2e..47ebaf235 100644
--- a/Changes
+++ b/Changes
@@ -3,6 +3,7 @@ Anope Version S V N
Provided by Anope Dev. <dev@anope.org> - 2005
02/05 A Support for Unreal 3.2 +I channel mode. [ #00]
02/03 A Merged anope-win32 branch into the main, now Win32 ready [ #00]
+02/06 F Win32 Module Load Errors. [#294]
02/05 F Change Ident function did not update the vident [#293]
01/30 F ChanServ help to reflect the avaiable commands. [ #00]
01/30 F ChanServ still used some commands that were not valid on all ircd [ #00]
diff --git a/src/modules.c b/src/modules.c
index 01d1571f3..a65af3230 100644
--- a/src/modules.c
+++ b/src/modules.c
@@ -279,10 +279,14 @@ int moduleCopyFile(char *name)
char input[4096];
int len;
- strncpy(output, MODULE_PATH, 4095); /* Get full path with .so extension */
- strncpy(input, MODULE_PATH, 4095); /* Get full path with .so extension */
+ strncpy(output, MODULE_PATH, 4095); /* Get full path with module extension */
+ strncpy(input, MODULE_PATH, 4095); /* Get full path with module extension */
len = strlen(output);
+#ifdef _WIN32
+ strncat(output, "runtime\\", 4095 - len);
+#else
strncat(output, "runtime/", 4095 - len);
+#endif
len += strlen(output);
strncat(output, name, 4095 - len);
strncat(input, name, 4095 - len);
@@ -290,11 +294,18 @@ int moduleCopyFile(char *name)
strncat(output, MODULE_EXT, 4095 - len);
strncat(input, MODULE_EXT, 4095 - len);
+#ifndef _WIN32
if ((source = fopen(input, "r")) == NULL) {
+#else
+ if ((source = fopen(input, "rb")) == NULL) {
+#endif
return MOD_ERR_NOEXIST;
}
-
+#ifndef _WIN32
if ((target = fopen(output, "w")) == NULL) {
+#else
+ if ((target = fopen(output, "wb")) == NULL) {
+#endif
return MOD_ERR_FILE_IO;
}
while ((ch = fgetc(source)) != EOF) {
@@ -338,13 +349,17 @@ int loadModule(Module * m, User * u)
moduleCopyFile(m->name);
- strncpy(buf, MODULE_PATH, 4095); /* Get full path with .so extension */
+ strncpy(buf, MODULE_PATH, 4095); /* Get full path with module extension */
len = strlen(buf);
+#ifndef _WIN32
strncat(buf, "runtime/", 4095 - len);
+#else
+ strncat(buf, "runtime\\", 4095 - len);
+#endif
len = strlen(buf);
strncat(buf, m->name, 4095 - len);
len = strlen(buf);
- strncat(buf, ".so", 4095 - len);
+ strncat(buf, MODULE_EXT, 4095 - len);
buf[4095] = '\0';
m->filename = sstrdup(buf);
diff --git a/version.log b/version.log
index 9b8ea5557..523f8d498 100644
--- a/version.log
+++ b/version.log
@@ -8,10 +8,14 @@
VERSION_MAJOR="1"
VERSION_MINOR="7"
VERSION_PATCH="8"
-VERSION_BUILD="569"
+VERSION_BUILD="570"
# $Log$
#
+# BUILD : 1.7.8 (570)
+# BUGS : 294
+# NOTES : Win32 Module Load Errors
+#
# BUILD : 1.7.8 (569)
# BUGS : N/A
# NOTES : Cleaned up the win32 makefiles, fixed hs_moo