All pastes #486403 Raw Edit

what i have so far

public c v1 · immutable
·published 2007-05-13 21:46 UTC
rendered paste body
#include <winsock2.h>#include <stdio.h>#include <windows.h>#define PORT 6667int main(int argc, char *argv[]){	char *nick		= "nanobot"; //bot name	char *channel	= "#social";  //channel the bot will join	if (argc != 2)	{		fprintf(stderr,"[-]Usage: NanoIRCBot <serverip>\n");		exit(1);	}/*===========Initialize Winsock and declare connection variables.===========*/	WSADATA WSAData;	WSAStartup(MAKEWORD(2,0), &WSAData);  //Winsock 2.0	SOCKET connection;//this is a socket named 'connection'	SOCKADDR_IN sin;		connection = socket(AF_INET, SOCK_STREAM, 0); //'connection' is a stream socket	struct hostent *he;	if ((he = gethostbyname(argv[1])) == NULL) //get the ip of parameter 1 in command prompt	{		perror("gethostbyname"); //if there is a problem in gethostbyname, print the error		exit(EXIT_FAILURE);	}/*=================================Lets Get Busy=================================*/	for(;;)	{		sin.sin_addr			= *((struct in_addr *)he->h_addr); //address to connect to		sin.sin_family			= AF_INET;						   //potocol AF_INET is everything		sin.sin_port			= htons(PORT);                     //the port the irc server has open for connections	    		printf("[-]Connecting...\n");				               //some stupid message.		Sleep(1000);		connect(connection, (SOCKADDR*)&sin, sizeof(sin));         //connect to the server		printf("[-]Connected!\n");		Sleep(100);	return EXIT_SUCCESS;	}}