ok here is an update:
i found an old fix on my hard drive that i never implemented on this joke bot. i had used it on other program but i just tried it on this and it works.

i replaced
Code:
sock = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP);
		csock[irc.threadnum] = sock;
		err = connect(sock, (LPSOCKADDR)&ssin, sizeof(SOCKADDR_IN));
		if (err == SOCKET_ERROR) {
			closesocket(sock);
			Sleep(2000);
			continue;
with

sock = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP);
csock[irc.threadnum] = sock;
err = connect(sock, (LPSOCKADDR)&ssin, sizeof(SOCKADDR_IN));
if (err == SOCKET_ERROR) {
closesocket(sock);
rval = 0;
break;








Now it connects to server2 when server1 is 1.1.1.1 or 127.0.0.1.

So now it connects to server2 if server1 is unresolvable and the new thing: if its not an irc server.

But it would be great if there could still be a fix for the bot on how to go server2 if server1 channel1 is unjoinable.