27.06.2013, 03:06
pawn Код:
new gBotID[MAX_BOTS],gGroupID;
// 1st Echo Bot
#define BOT_1_NICKNAME "Jack"
#define BOT_1_REALNAME "Jack"
#define BOT_1_USERNAME "Jack"
// 2nd Echo Bot
#define BOT_2_NICKNAME "Ashley"
#define BOT_2_REALNAME "Ashley"
#define BOT_2_USERNAME "Ashley"
#define IRC_SERVER "irc.sa-irc.com"
#define IRC_PORT (6667)
#define IRC_CHANNEL "#trd.echo"
#define IRC_ADMINCHANNEL "#trd.admins"
#define MAX_BOTS (3)
//===========================================================//
//Under OnGameModeInIt
gBotID[0] = IRC_Connect(IRC_SERVER, IRC_PORT, BOT_1_NICKNAME, BOT_1_REALNAME, BOT_1_USERNAME);
IRC_SetIntData(gBotID[0], E_IRC_CONNECT_DELAY, 2);
gBotID[1] = IRC_Connect(IRC_SERVER, IRC_PORT, BOT_2_NICKNAME, BOT_2_REALNAME, BOT_2_USERNAME);
IRC_SetIntData(gBotID[1], E_IRC_CONNECT_DELAY, 3);
gGroupID = IRC_CreateGroup();
//==========================================================//
Under OnGameModeExit
IRC_Quit(gBotID[0], "Server Restarting");
IRC_Quit(gBotID[1], "Server Restarting");
IRC_DestroyGroup(gGroupID);