X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Firc.cpp;h=ecdafaaceaf8e261fc16199fa345f7a2b63a2fcd;hb=15e9a03687e99d6b1a7a90e56e69a37faa6bb9b8;hp=b3201b12656b1cae97bbb70086e819bebd246659;hpb=6853140e899841c78ef5f02a261eefeb835e9abf;p=novacoin.git diff --git a/src/irc.cpp b/src/irc.cpp index b3201b1..ecdafaa 100644 --- a/src/irc.cpp +++ b/src/irc.cpp @@ -7,10 +7,7 @@ #include "base58.h" #include "net.h" -#include // for startswith() and endswith() - using namespace std; -using namespace boost; int nGotIRCAddresses = 0; @@ -248,8 +245,7 @@ void ThreadIRCSeed2(void* parg) if (!RecvUntil(hSocket, "Found your hostname", "using your IP address instead", "Couldn't look up your hostname", "ignoring hostname")) { - closesocket(hSocket); - hSocket = INVALID_SOCKET; + CloseSocket(hSocket); nErrorWait = nErrorWait * 11 / 10; if (Wait(nErrorWait += 60)) continue; @@ -273,8 +269,7 @@ void ThreadIRCSeed2(void* parg) int nRet = RecvUntil(hSocket, " 004 ", " 433 "); if (nRet != 1) { - closesocket(hSocket); - hSocket = INVALID_SOCKET; + CloseSocket(hSocket); if (nRet == 2) { printf("IRC name already in use\n"); @@ -338,7 +333,7 @@ void ThreadIRCSeed2(void* parg) { // index 7 is limited to 16 characters // could get full length name at index 10, but would be different from join messages - strName = vWords[7].c_str(); + strName = vWords[7]; printf("IRC got who\n"); } @@ -349,7 +344,7 @@ void ThreadIRCSeed2(void* parg) printf("IRC got join\n"); } - if (boost::algorithm::starts_with(strName, "u")) + if (strName.compare(0,1, "u") == 0) { CAddress addr; if (DecodeAddress(strName, addr)) @@ -365,8 +360,7 @@ void ThreadIRCSeed2(void* parg) } } } - closesocket(hSocket); - hSocket = INVALID_SOCKET; + CloseSocket(hSocket); if (GetTime() - nStart > 20 * 60) {