diff options
| author | Adam <Adam@anope.org> | 2011-04-26 19:13:51 -0400 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2011-05-16 04:08:47 -0400 |
| commit | e7887c1f013248274574ab8e3167f742ccb3d69b (patch) | |
| tree | f9f5959512b7129711f03156320ae0e46cabaec3 /src/win32/windows.cpp | |
| parent | 076ebafa1b4cc935c466c615b94eaac415af9a67 (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.cpp | 13 |
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) |
