// MrC0de.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include <winsock.h>
#include <iostream>
#include <string>
using namespace std;
#include <algorithm>
#include "MrC0de.h"


int _tmain(int argc, _TCHAR* argv[])
{
	//SETUP WSA
	WSADATA wsaData; // if this doesn't work
	//WSAData wsaData; // then try this instead
	if (WSAStartup(MAKEWORD(1, 1), &wsaData) != 0) {
		fprintf(stderr, "WSAStartup failed.\n");
		exit(1);
	}
	//WSA SETUP DONE

	//Make An IrcBot And Start It.
	IrcBot MrC0de("irc.neuroticnetworks.com",6667,"MrC0de","b0tb0t");
	if (MrC0de.Start() != -1) {

		//Main Loop
		while(!MrC0de.Die) {
			MrC0de.ProcessIrc();	
		}
	} else {
		cout<<"Cannot Start() MrC0de"<<endl;
	}

	WSACleanup(); //Clean Your Socks
	return 0;
}


