summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2008-11-26 01:41:39 +0000
committercyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2008-11-26 01:41:39 +0000
commitc5b9eaeda030638a6fbd59396f7ad61baaf70fad (patch)
treefd7fa9e2782d1e54c02fd999dbf5576c81af4376
parent90f6431603714f3c2abbe44550bca8824bb8bbe6 (diff)
Various fixes for compiling under Windows.
Also updated ms_* modules to use std::vector Memo struct from earlier commit. git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1797 5417fbe8-f217-4b02-8779-1006273d7864
-rw-r--r--include/bots.h2
-rw-r--r--include/configreader.h2
-rw-r--r--include/modules.h6
-rw-r--r--include/services.h18
-rw-r--r--include/sockets.h1
-rw-r--r--include/users.h2
-rw-r--r--install.js156
-rw-r--r--makefile.inc.win32111
-rw-r--r--src/core/Makefile.win322
-rw-r--r--src/core/ms_cancel.c10
-rw-r--r--src/core/ms_check.c8
-rw-r--r--src/core/ms_del.c19
-rw-r--r--src/core/ms_info.c36
-rw-r--r--src/core/ms_list.c20
-rw-r--r--src/core/ms_read.c16
-rw-r--r--src/init.c4
-rw-r--r--src/main.c2
-rw-r--r--src/makefile.win3229
-rw-r--r--src/misc.c2
-rw-r--r--src/modulemanager.cpp6
-rw-r--r--src/modules/makefile.win326
-rw-r--r--src/protocol/Makefile.win324
-rw-r--r--src/tools/db-convert.c3
-rw-r--r--src/tools/db-merger.c2
-rw-r--r--version.log1050
25 files changed, 731 insertions, 786 deletions
diff --git a/include/bots.h b/include/bots.h
index 73941fbc4..7b175d99f 100644
--- a/include/bots.h
+++ b/include/bots.h
@@ -15,7 +15,7 @@
* --lara
*/
-class BotInfo
+class CoreExport BotInfo
{
public:
BotInfo *next, *prev;
diff --git a/include/configreader.h b/include/configreader.h
index 89b28e672..d7786e11d 100644
--- a/include/configreader.h
+++ b/include/configreader.h
@@ -420,7 +420,7 @@ class ConfigException : public std::exception
* Constructing the class using one parameter allows you to specify a path to your own configuration
* file, otherwise, inspircd.conf is read.
*/
-class ConfigReader
+class CoreExport ConfigReader
{
protected:
/** The contents of the configuration file
diff --git a/include/modules.h b/include/modules.h
index 524b23e1a..fc7451b49 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -150,7 +150,7 @@ struct ModuleLang_ {
/** Every module in Anope is actually a class.
*/
-CoreExport class Module
+class CoreExport Module
{
private:
bool permanent;
@@ -163,7 +163,7 @@ CoreExport class Module
*/
std::string filename;
- void *handle;
+ ano_module_t handle;
time_t created;
std::string version;
std::string author;
@@ -285,7 +285,7 @@ CoreExport class Module
/** Used to manage modules.
*/
-CoreExport class ModuleManager
+class CoreExport ModuleManager
{
public:
/** Load up a list of modules.
diff --git a/include/services.h b/include/services.h
index ad67f1eb4..163d620fa 100644
--- a/include/services.h
+++ b/include/services.h
@@ -178,10 +178,18 @@ extern int strncasecmp(const char *, const char *, size_t);
#define MARK_DEPRECATED
#endif
-/** XXX: we need to grab these from inspircd -- w00t
- */
-#define DllExport
-#define CoreExport
+#ifdef _WIN32
+# ifdef MODULE_COMPILE
+# define CoreExport __declspec(dllimport)
+# define DllExport __declspec(dllexport)
+# else
+# define CoreExport __declspec(dllexport)
+# define DllExport __declspec(dllimport)
+# endif
+#else
+# define DllExport
+# define CoreExport
+#endif
/** This definition is used as shorthand for the various classes
* and functions needed to make a module loadable by the OS.
@@ -203,7 +211,7 @@ extern int strncasecmp(const char *, const char *, size_t);
} \
return TRUE; \
} \
- extern "C" DllExport void *destroy_module(y *m) \
+ extern "C" DllExport void destroy_module(y *m) \
{ \
delete m; \
}
diff --git a/include/sockets.h b/include/sockets.h
index 470ad7761..dea2de663 100644
--- a/include/sockets.h
+++ b/include/sockets.h
@@ -22,6 +22,7 @@ typedef SOCKET ano_socket_t;
#define ano_sockgeterr() WSAGetLastError()
#define ano_sockseterr(err) WSASetLastError(err)
/* ano_sockstrerror in sockutil.c */
+extern char *ano_sockstrerror(int);
/* ano_socksetnonb in sockutil.c */
#define ano_sockerrnonb(err) (err == WSAEINPROGRESS || err == WSAEWOULDBLOCK)
#define SOCKERR_EBADF WSAENOTSOCK
diff --git a/include/users.h b/include/users.h
index 315a6c508..a54ad255d 100644
--- a/include/users.h
+++ b/include/users.h
@@ -20,7 +20,7 @@ struct u_chaninfolist {
};
/* Online user and channel data. */
-class User : public Extensible
+class CoreExport User : public Extensible
{
public: // XXX: exposing a tiny bit too much
User *next, *prev;
diff --git a/install.js b/install.js
index 57e7cbdc2..678d3bb69 100644
--- a/install.js
+++ b/install.js
@@ -56,24 +56,24 @@ var installerQuestions = [
f.WriteLine("MYSQL_INC_PATH=/I $(MYSQL_INC)");
f.WriteLine("BASE_CFLAGS=/D $(BASE_CFLAGS)");
f.WriteLine("MYPASQL_BUILD=$(CC) /LD $(MYSQL_INC_PATH) src\\mypasql.c /link $(MYSQL_LIB_PATH) $(LFLAGS) /DEF:src\mypasql.def libmysql.lib zlib.lib ws2_32.lib advapi32.lib /NODEFAULTLIB:LIBCMTD.lib");
- f.WriteLine("LIBS=$(LIBS) libmysql.lib zlib.lib");
+ f.WriteLine("LIBS=$(LIBS) libmysql.lib zlib.lib");
}
else {
f.WriteLine("USE_MYSQL=0");
}
- }
+ }
},
-
+
];
var buildPackages = [
{
'name' : 'Microsoft Visual Studio 2008 (New PSDK)',
- 'libpaths' : [
+ 'libpaths' : [
'Program Files\\Microsoft Visual Studio 9.0\\VC\\Lib',
'Program Files\\Microsoft Platform SDK for Windows Server 2003 R2\\Lib'
],
- 'incpaths' : [
+ 'incpaths' : [
'Program Files\\Microsoft Visual Studio 9.0\\VC\\Include',
'Program Files\\Microsoft Platform SDK for Windows Server 2003 R2\\Include'
],
@@ -99,7 +99,7 @@ var buildPackages = [
'additional_switches' : [ '/w' ],
'installedDrive' : 'C'
},
-
+
{
'name' : 'Microsoft Visual Studio 2005 (New PSDK)',
'libpaths' : [
@@ -119,7 +119,7 @@ var buildPackages = [
],
'installedDrive' : 'C'
},
- {
+ {
'name' : 'Microsoft Visual Studio 2005 (Old PSDK)',
'libpaths' : [
'Program Files\\Microsoft Visual Studio 8\\VC\\Lib',
@@ -138,7 +138,7 @@ var buildPackages = [
],
'installedDrive' : 'C'
},
-
+
{
'name' : 'Microsoft Visual Studio .NET 2003',
'libpaths' : [
@@ -152,7 +152,7 @@ var buildPackages = [
'nmake' : [
'Program Files\\Microsoft Visual Studio .NET 2003\\VC7\\Bin',
''
- ],
+ ],
'additional_switches' : false,
'installedDrive' : 'C'
},
@@ -174,10 +174,10 @@ var buildPackages = [
],
'installedDrive' : 'C'
}
-
- ];
-
-
+
+ ];
+
+
var mysqlVersions = [
{
'name' : 'MySQL 5.1',
@@ -199,10 +199,10 @@ var buildPackages = [
'incpaths' : [
'Program Files\\MySQL\\MySQL Server 5.0\\Include'
],
- 'dllfile' : 'Program Files\\MySQL\\MySQL Server 5.0\\Bin\\libmysql.dll',
+ 'dllfile' : 'Program Files\\MySQL\\MySQL Server 5.0\\Bin\\libmysql.dll',
'installedDrive' : 'C'
},
-
+
{
'name' : 'MySQL 4.1',
'libpaths' : [
@@ -211,10 +211,10 @@ var buildPackages = [
'incpaths' : [
'Program Files\\MySQL\\MySQL Server 4.1\\Include'
],
- 'dllfile' : 'Program Files\\MySQL\\MySQL Server 4.1\\Bin\\libmysql.dll',
+ 'dllfile' : 'Program Files\\MySQL\\MySQL Server 4.1\\Bin\\libmysql.dll',
'installedDrive' : 'C'
- },
-
+ },
+
{
'name' : 'MySQL 4.0',
'libpaths' : [
@@ -225,8 +225,8 @@ var buildPackages = [
],
'dllfile' : 'Program Files\\MySQL\\MySQL Server 4.0\\Bin\\libmysql.dll',
'installedDrive' : 'C'
- },
-
+ },
+
{
'name' : 'MySQL 3.23 or older (or other default path)',
'libpaths' : [
@@ -236,11 +236,11 @@ var buildPackages = [
'mysql\\include'
],
'dllfile' : 'mysql\\Bin\\libmysql.dll',
- 'installedDrive' : 'C'
+ 'installedDrive' : 'C'
}
- ];
-
+ ];
+
var bannerReplacements = [
{
'findtext' : /CURVER/g,
@@ -250,32 +250,32 @@ var buildPackages = [
'findtext' : / For more options type .\/Config --help/g,
'replacement' : function() { return ''; }
}
- ];
-
-
- var fso = WScript.CreateObject("Scripting.FileSystemObject");
+ ];
+
+
+ var fso = WScript.CreateObject("Scripting.FileSystemObject");
var x, y, z;
-
+
if (fso.FileExists('.BANNER')) {
var bannerStream = fso.OpenTextFile(".BANNER");
- var bannerText = bannerStream.ReadAll();
+ var bannerText = bannerStream.ReadAll();
bannerStream.close();
-
+
for (x in bannerReplacements) {
var thisReplacement = bannerReplacements[x];
bannerText = bannerText.replace(thisReplacement['findtext'], thisReplacement['replacement']);
}
-
+
WScript.Echo(bannerText+"\n");
- }
+ }
else {
WScript.Echo("ERROR: Cannot find banner file!\n");
}
-
+
WScript.Echo("Press Enter to Begin...");
- InstallerInput();
+ InstallerInput();
WScript.Echo("");
-
+
for (x in installerQuestions) {
var thisQuestion = installerQuestions[x];
var validResponse = false;
@@ -305,10 +305,10 @@ var buildPackages = [
else if (thisQuestion.store_answer(inputValue)) {
validResponse = true;
}
- }
+ }
WScript.Echo("");
}
-
+
if (!findCompiler()) {
WScript.Echo("\nERROR: No suitable build tools were found!");
WScript.Echo("Please ensure you have downloaded and installed a version of Visual C++ and/or PlatformSDK.\n");
@@ -320,7 +320,7 @@ var buildPackages = [
for (x in installerResponses) {
var thisResponse = installerResponses[x];
WScript.Echo("\t"+x+":\t\t["+thisResponse.toUpperCase()+"]");
- }
+ }
for (x in softwareVersions) {
var thisVer = softwareVersions[x];
if (!thisVer) {
@@ -328,12 +328,12 @@ var buildPackages = [
}
else {
WScript.Echo("\t"+x+" Version:\t\t"+thisVer.name);
- }
+ }
}
WScript.Echo("\tAnope Version:\t\t\t"+anopeVersion);
WScript.Echo("\nTo continue, please press Enter...");
- InstallerInput();
-
+ InstallerInput();
+
var f = fso.OpenTextFile("Makefile.inc.win32", 2);
f.WriteLine("#");
f.WriteLine("# Generated by install.js");
@@ -364,47 +364,47 @@ var buildPackages = [
f.WriteLine("CC=cl");
f.WriteLine("RC=rc");
f.WriteLine("MAKE=nmake -f Makefile.win32");
- f.WriteLine("BASE_CFLAGS=$(VC6) /O2 /MD /TP /EHsc $(INCFLAGS)");
+ f.WriteLine("BASE_CFLAGS=$(VC6) /O2 /MD /TP /GR /EHsc $(INCFLAGS)");
f.WriteLine("RC_FLAGS="+path_line_rc);
f.WriteLine("LIBS=wsock32.lib advapi32.lib /NODEFAULTLIB:libcmtd.lib");
- f.WriteLine("LFLAGS=$(LIBPATH)");
-
+ f.WriteLine("LFLAGS=$(LIBPATH)");
+
for (x in installerQuestions) {
var thisQuestion = installerQuestions[x];
thisQuestion.commit_config();
- }
-
+ }
+
f.WriteLine("MORE_CFLAGS = /I\"../include\"");
f.WriteLine("CFLAGS = /nologo $(CDEFS) $(BASE_CFLAGS) $(MORE_CFLAGS)");
f.close();
-
+
generateRC();
-
+
WScript.Echo("\nConfiguration Complete!");
WScript.Echo("-----------------------\n");
WScript.Echo("Anope has been configured to your system. To compile, simply type:");
WScript.Echo("nmake -f Makefile.win32\n");
WScript.Echo("If you update Anope, you should run this script again to ensure\nall available options are set.\n");
-
- }
+
+ }
// Fin.
-
+
// -----------------------------------------------------------------
-
+
// Functions
-
+
function FindAnopeVersion() {
if (!fso.FileExists('version.log')) {
anopeVersion = 'Unknown';
return;
- }
-
+ }
+
var versionLog = fso.OpenTextFile("version.log");
while (!versionLog.atEndOfStream) {
var versionLine = versionLog.readline();
var thisMatch = versionLine.replace('\n', '');
while (thisMatch.match(/\"/g)) {
- thisMatch = thisMatch.replace('"', '');
+ thisMatch = thisMatch.replace('"', '');
}
versionLine = thisMatch;
if (versionLine.match(/VERSION_MAJOR=/g)) {
@@ -414,30 +414,30 @@ var buildPackages = [
if (versionLine.match(/VERSION_MINOR=/g)) {
vMin = versionLine.replace('VERSION_MINOR=', '');
continue;
- }
+ }
if (versionLine.match(/VERSION_PATCH=/g)) {
vPat = versionLine.replace('VERSION_PATCH=', '');
continue;
- }
+ }
if (versionLine.match(/VERSION_EXTRA=/g)) {
vExtra = versionLine.replace('VERSION_EXTRA=', '');
continue;
- }
+ }
if (versionLine.match(/VERSION_BUILD=/g)) {
vBuild = versionLine.replace('VERSION_BUILD=', '');
continue;
- }
+ }
}
versionLog.close();
anopeVersion = vMaj+"."+vMin+"."+vPat+"."+vBuild+vExtra;
return;
}
-
+
function InstallerInput() {
var input = WScript.StdIn.Readline();
- return input;
+ return input;
}
-
+
function findMySQL() {
WScript.Echo("\nLooking for MySQL...\n");
var installedDrive = "";
@@ -459,11 +459,11 @@ var buildPackages = [
}
return false;
}
-
+
function findCompiler() {
WScript.Echo("\nLooking for a suitable compiler...\n");
var noPSDK = false;
- var installedDrive = "";
+ var installedDrive = "";
for (x in buildPackages) {
var thisPack = buildPackages[x];
WScript.Echo("Looking for: "+thisPack.name+"...");
@@ -478,7 +478,7 @@ var buildPackages = [
}
if (!findFile("advapi32.lib", thisPack.libpaths)) {
WScript.Echo("ERROR: Cannot find advapi32.lib - Probably missing PlatformSDK...\n");
- noPSDK = true;
+ noPSDK = true;
continue;
}
if (!findFile("stdio.h", thisPack.incpaths)) {
@@ -487,7 +487,7 @@ var buildPackages = [
}
if (!findFile("windows.h", thisPack.incpaths)) {
WScript.Echo("ERROR: Cannot find windows.h - Probably missing PlatformSDK headers...\n");
- noPSDK = true;
+ noPSDK = true;
continue;
}
if (!findFile("nmake.exe", thisPack.nmake)) {
@@ -497,7 +497,7 @@ var buildPackages = [
WScript.Echo("nmake.exe is also available in the PlatformSDK which can be freely downloaded from Microsoft.\n");
WScript.Echo("nmake.exe:\nhttp://download.microsoft.com/download/vc15/patch/1.52/w95/en-us/nmake15.exe\n");
break;
- }
+ }
WScript.Echo("SUCCESS: "+thisPack.name+" was found, and is complete!");
thisPack.installedDrive = installedDrive;
softwareVersions.Compiler = thisPack;
@@ -507,11 +507,11 @@ var buildPackages = [
WScript.Echo("Some of the build tools were detected on your computer, but the essential PlatformSDK components were missing.");
WScript.Echo("You will need to download the PlatformSDK from the URL below, ensuring that the Core Windows files, and Debugging Tools are installed.");
WScript.Echo("For more details on installing the PlatformSDK, visit http://windows.anope.org\n");
- WScript.Echo("PSDK: http://download.microsoft.com/download/a/5/f/a5f0d781-e201-4ab6-8c6a-9bb4efed1e1a/PSDK-x86.exe\n");
+ WScript.Echo("PSDK: http://download.microsoft.com/download/a/5/f/a5f0d781-e201-4ab6-8c6a-9bb4efed1e1a/PSDK-x86.exe\n");
}
return false;
}
-
+
function findFile(fileName, arrayOfPaths) {
for (z in arrayOfPaths) {
var thisPath = arrayOfPaths[z];
@@ -522,27 +522,27 @@ var buildPackages = [
}
}
}
- return false;
+ return false;
}
-
+
function generateRC() {
var version_matches = [
{
'find' : /VERSION_COMMA/g,
'replacement' : vMaj+","+vMin+","+vPat+","+vBuild
},
-
+
{
'find' : /VERSION_FULL/g,
'replacement' : anopeVersion
},
-
+
{
'find' : /VERSION_DOTTED/g,
'replacement' : vMaj+"."+vMin+"."+vPat+"."+vBuild
}
];
-
+
var template = fso.OpenTextFile("src/win32.rc.template", 1);
var output = fso.OpenTextFile("src/win32.rc", 2, true);
if (!template) {
@@ -553,15 +553,15 @@ var buildPackages = [
}
var templateText = template.ReadAll();
template.close();
-
+
for (x in version_matches) {
var thisVerStr = version_matches[x];
while (templateText.match(thisVerStr.find)) {
templateText = templateText.replace(thisVerStr.find, thisVerStr.replacement);
}
}
-
+
output.WriteLine(templateText);
output.close();
}
-
+
diff --git a/makefile.inc.win32 b/makefile.inc.win32
index 75567aa2a..f9b06845a 100644
--- a/makefile.inc.win32
+++ b/makefile.inc.win32
@@ -1,93 +1,18 @@
-#
-# Anope IRC Services 1.7.9 for Windows
-#
-# Contact us at info@anope.org
-#
-# Please read COPYING and README for further details.
-#
-# Based on the original code of Epona by Lara.
-# Based on the original code of Services by Andy Church.
-#
-
-# Please read and edit the configurations options below.
-
-
-# Set this to 1 to enable MySQL support
-USE_MYSQL=0
-# Set this to the path where the MySQL includes can be found
-#MYSQL_INC="c:\\mysql\\include\\"
-# Set this to the path where the MySQL libraries can be found
-#MYSQL_LIB="c:\\mysql\\lib\\opt\\"
-
-# Set this to 1 to enable database encryption
-DB_ENCRYPTION=0
-
-# If you want to change the names/locations of files/folders, you
-# can do that here.
-PROGRAM=anope.exe
-DATDEST=data
-
-# If you are compiling using VC6, or get __ftol2 errors, please uncomment
-# the following line:
-#VC6=/QIfist
-
-# If you are getting errors such as 'Cannot find wsock32.lib', then change
-# the following line to the path where the library files can be found.
-#
-# Eg: LIBPATH=C:\\Program Files\\Microsoft Visual Studio .NET 2003\\Vc7\\lib
-#
-LIBPATH=
-
-# If you edited the line above, uncomment the next line.
-#LFLAGS=/LIBPATH:"$(LIBPATH)"
-
-
-###############################################################
-#Don't touch anything below unless you know what you are doing#
-###############################################################
-
-
-CC=cl
-RC=rc
-MAKE=nmake -f Makefile.win32
-BASE_CFLAGS=/O2 /MD
-LIBS=wsock32.lib advapi32.lib /NODEFAULTLIB:libcmtd.lib
-ELIBS=
-MLIBS=
-
-!IF $(USE_MYSQL) == 1
-!IF $(MYSQL_LIB) != ""
-LIBS=$(LIBS) /LIBPATH:$(MYSQL_LIB)
-MYSQL_LIB_PATH=/LIBPATH:$(MYSQL_LIB)
-!ENDIF
-!IF $(MYSQL_INC) != ""
-BASE_CFLAGS=$(BASE_CFLAGS) /I $(MYSQL_INC)
-MYSQL_INC_PATH=/I $(MYSQL_INC)
-!ENDIF
-BASE_CFLAGS=$(BASE_CFLAGS)
-
-MYPASQL_BUILD=$(CC) /LD $(MYSQL_INC_PATH) src\mypasql.c /link $(MYSQL_LIB_PATH) $(LFLAGS) \
-/DEF:src\mypasql.def libmysql.lib zlib.lib ws2_32.lib advapi32.lib /NODEFAULTLIB:LIBCMTD.lib
-
-LIBS=$(LIBS) libmysql.lib zlib.lib
-!ENDIF
-
-!IF $(DB_ENCRYPTION) == 1
-BASE_CFLAGS=/D USE_ENCRYPTION /D ENCRYPT_MD5 $(BASE_CFLAGS)
-!ENDIF
-
-# Note that changing any of these options (or, in fact, anything in this
-# file) will automatically cause a full rebuild of Services.
-
-# Compilation options:
-# -DCLEAN_COMPILE Attempt to compile without any warnings (note that
-# this may reduce performance)
-
-CDEFS =
-
-# Add any extra flags you want here. The default line enables warnings and
-# debugging symbols on GCC. If you have a non-GCC compiler, you may want
-# to comment it out or change it.
-
-MORE_CFLAGS = /I"../include"
-CFLAGS = /nologo $(VC6) $(CDEFS) $(BASE_CFLAGS) $(MORE_CFLAGS)
+#
+# Generated by install.js
+#
+LIBPATH=/LIBPATH:"C:\Program Files\Microsoft Visual Studio .NET 2003\VC7\Lib" /LIBPATH:"C:\Program Files\Microsoft Visual Studio .NET 2003\VC7\PlatformSDK\Lib"
+INCFLAGS=/I "C:\Program Files\Microsoft Visual Studio .NET 2003\VC7\Include" /I "C:\Program Files\Microsoft Visual Studio .NET 2003\VC7\PlatformSDK\Include"
+VERSION=1.9.0.0-git
+PROGRAM=anope.exe
+DATDEST=data
+CC=cl
+RC=rc
+MAKE=nmake -f Makefile.win32
+BASE_CFLAGS=$(VC6) /O2 /MD /TP /GR /EHsc $(INCFLAGS)
+RC_FLAGS=/i "C:\Program Files\Microsoft Visual Studio .NET 2003\VC7\Include" /i "C:\Program Files\Microsoft Visual Studio .NET 2003\VC7\PlatformSDK\Include"
+LIBS=wsock32.lib advapi32.lib /NODEFAULTLIB:libcmtd.lib
+LFLAGS=$(LIBPATH)
+USE_MYSQL=0
+MORE_CFLAGS = /I"../include"
+CFLAGS = /nologo $(CDEFS) $(BASE_CFLAGS) $(MORE_CFLAGS)
diff --git a/src/core/Makefile.win32 b/src/core/Makefile.win32
index f313fe862..b005fd1de 100644
--- a/src/core/Makefile.win32
+++ b/src/core/Makefile.win32
@@ -3,7 +3,7 @@ include ../../Makefile.inc.win32
SRCS=bs_act.c bs_assign.c bs_badwords.c bs_bot.c bs_botlist.c bs_fantasy.c bs_fantasy_kick.c bs_fantasy_kickban.c bs_fantasy_owner.c bs_fantasy_seen.c bs_help.c bs_info.c bs_kick.c bs_say.c bs_set.c bs_unassign.c cs_access.c cs_akick.c cs_ban.c cs_clear.c cs_drop.c cs_forbid.c cs_getkey.c cs_getpass.c cs_help.c cs_identify.c cs_info.c cs_invite.c cs_kick.c cs_list.c cs_logout.c cs_modes.c cs_register.c cs_sendpass.c cs_set.c cs_status.c cs_suspend.c cs_topic.c cs_xop.c enc_none.c enc_md5.c enc_old.c he_help.c hs_del.c hs_delall.c hs_group.c hs_help.c hs_list.c hs_off.c hs_on.c hs_set.c hs_setall.c ms_cancel.c ms_check.c ms_del.c ms_help.c ms_info.c ms_list.c ms_read.c ms_rsend.c ms_send.c ms_sendall.c ms_set.c ms_staff.c ns_access.c ns_alist.c ns_drop.c ns_forbid.c ns_getemail.c ns_getpass.c ns_ghost.c ns_group.c ns_help.c ns_identify.c ns_info.c ns_list.c ns_logout.c ns_recover.c ns_register.c ns_release.c ns_sendpass.c ns_set.c ns_saset.c ns_status.c ns_suspend.c ns_update.c os_admin.c os_akill.c os_chankill.c os_chanlist.c os_clearmodes.c os_defcon.c os_global.c os_help.c os_ignore.c os_jupe.c os_kick.c os_logonnews.c os_mode.c os_modinfo.c os_modlist.c os_modload.c os_modunload.c os_noop.c os_oline.c os_oper.c os_opernews.c os_quit.c os_randomnews.c os_raw.c os_reload.c os_restart.c os_session.c os_set.c os_sgline.c os_shutdown.c os_sqline.c os_staff.c os_stats.c os_svsnick.c os_szline.c os_umode.c os_update.c os_userlist.c
OBJECTS= $(SRCS:.c=.dll)
CFLAGS=/LD /MD /D MODULE_COMPILE $(CFLAGS) /I"../../include"
-LFLAGS=/link ../anope.lib wsock32.lib $(LIBS) $(LFLAGS) $(MYSQL_LIB_PATH) /export:AnopeInit /export:AnopeFini /VERSION:$(VERSION)
+LFLAGS=/link ../anope.lib wsock32.lib $(LIBS) $(LFLAGS) $(MYSQL_LIB_PATH) /export:init_module /export:destroy_module /VERSION:$(VERSION)
all: $(OBJECTS)
diff --git a/src/core/ms_cancel.c b/src/core/ms_cancel.c
index c7a5402d0..715481777 100644
--- a/src/core/ms_cancel.c
+++ b/src/core/ms_cancel.c
@@ -76,11 +76,11 @@ int do_cancel(User * u)
} else {