struct ircaddr
{
struct in_addr ip;
- unsigned short port;
+ uint16_t port;
};
#pragma pack(pop)
// or if it keeps failing because the nick is already in use.
if (!fNoListen && GetLocal(addrLocal, &addrIPv4) && nNameRetry<3)
strMyName = EncodeAddress(GetLocalAddress(&addrConnect));
- if (strMyName == "")
+ if (strMyName.empty())
strMyName = strprintf("x%" PRIu64 "", GetRand(1000000000));
Send(hSocket, strprintf("NICK %s\r", strMyName.c_str()).c_str());
{
printf("IRC name already in use\n");
nNameRetry++;
- Wait(10);
- continue;
+ if (Wait(10))
+ continue;
+ else
+ return;
}
nErrorWait = nErrorWait * 11 / 10;
if (Wait(nErrorWait += 60))