summaryrefslogtreecommitdiff
path: root/src/win32/windows.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2011-04-26 19:13:51 -0400
committerAdam <Adam@anope.org>2011-05-16 04:08:47 -0400
commite7887c1f013248274574ab8e3167f742ccb3d69b (patch)
treef9f5959512b7129711f03156320ae0e46cabaec3 /src/win32/windows.cpp
parent076ebafa1b4cc935c466c615b94eaac415af9a67 (diff)
Unmodularized the socket engine because its causing problems and really is unnecessary
Diffstat (limited to 'src/win32/windows.cpp')
-rw-r--r--src/win32/windows.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/win32/windows.cpp b/src/win32/windows.cpp
index 3876c62bf..265b5601b 100644
--- a/src/win32/windows.cpp
+++ b/src/win32/windows.cpp
@@ -34,6 +34,19 @@ WindowsLanguage WindowsLanguages[] = {
{NULL, 0}
};
+WSADATA SocketEngine::wsa;
+
+void OnStartup()
+{
+ if (WSAStartup(MAKEWORD(2, 0), &wsa))
+ throw FatalException("Failed to initialize WinSock library");
+}
+
+void OnShutdown()
+{
+ WSACleanup();
+}
+
USHORT WindowsGetLanguage(const char *lang)
{
for (int i = 0; WindowsLanguages[i].languageName; ++i)