forked from Helbreath/server
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIrcBot.cpp
More file actions
33 lines (28 loc) · 692 Bytes
/
Copy pathIrcBot.cpp
File metadata and controls
33 lines (28 loc) · 692 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include "Game.h"
#include "ircbot.h"
#include "XSocket.h"
CIrcBot::CIrcBot(void)
: m_pIrcSocket(NULL)
{
}
CIrcBot::~CIrcBot(void)
{
}
void CIrcBot::Startup(char* cServerAddr, short sServerPort, HWND hWnd)
{
m_pIrcSocket = new class XSocket(hWnd,DEF_XSOCKBLOCKLIMIT);
if (m_pIrcSocket->bConnect("24.49.159.152",3000,WM_ONBOTSOCKETEVENT) == FALSE)
MessageBox(hWnd,"IrcBot Failed To Start",0,0);
m_pIrcSocket->bInitBufferSize(DEF_MSGBUFFERSIZE);
//for(int i=0;i<10;i++)
SendTestMessage();
}
void CIrcBot::Shutdown(void)
{
if (m_pIrcSocket != NULL) delete m_pIrcSocket;
m_pIrcSocket = NULL;
}
void CIrcBot::SendTestMessage(void)
{
m_pIrcSocket->iSendMsgText("[KLKS]2Win",10,0);
}