+/* +------------------------------------+\r
+ * | Inspire Internet Relay Chat Daemon |\r
+ * +------------------------------------+\r
+ *\r
+ * InspIRCd: (C) 2002-2007 InspIRCd Development Team\r
+ * See: http://www.inspircd.org/wiki/index.php/Credits\r
+ *\r
+ * This program is free but copyrighted software; see\r
+ * the file COPYING for details.\r
+ *\r
+ * ---------------------------------------------------\r
+ */\r
+\r
#include "inspircd_win32wrapper.h"\r
#include "inspircd.h"\r
#include <string>\r
sockaddr_in sa;\r
int len = sizeof(SOCKADDR);\r
int rv = WSAStringToAddress((LPSTR)src, af, NULL, (LPSOCKADDR)&sa, &len);\r
+ if(rv >= 0)\r
+ {\r
+ if(WSAGetLastError() == 10022) // Invalid Argument\r
+ rv = 0;\r
+ else\r
+ rv = 1;\r
+ }\r
memcpy(dst, &sa.sin_addr, sizeof(struct in_addr));\r
return rv;\r
}\r
{\r
COORD coordScreen = { 0, 0 }; /* here's where we'll home the cursor */\r
HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);\r
- BOOL bSuccess;\r
DWORD cCharsWritten;\r
CONSOLE_SCREEN_BUFFER_INFO csbi; /* to get buffer info */ \r
DWORD dwConSize; /* number of character cells in the current buffer */ \r
}\r
}\r
return;\r
-}
\ No newline at end of file
+}\r