Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define BOT1NOMEPRINCIPAL "" // Defina o Nick Do bot
- #define BOT1NOMEALTERNATIVO "" // Nome Alternativo
- #define BOT1NOMEREAL "" // Real name
- #define BOT1NOMEDEUSUARIO "" // O Mesmo do BOT1NOMEPRINCIPAL
- #define BOT2NOMEPRINCIPAL "" // Defina o Nick Do bot
- #define BOT2NOMEALTERNATIVO "" // Nome Alternativo
- #define BOT2NOMEREAL "" // Real name
- #define BOT2NOMEDEUSUARIO "" // O Mesmo do BOT1NOMEPRINCIPAL
- #define IRC_SERVIDOR "" // Servidor Exemplo "irc.rizon.net"
- #define IRC_PORTA () // Porta Exemplo (6667)
- #define IRC_CANAL "" // Canal Exemplo #Teste
- #define IRC_OPERCANAL "" // Canal Oper
- new BotIDs[2],
- GrupoID;
- forward IRC_ConectarServidor();
- forward IRC_DesconectarServidor();
- //==============================================================================
- public IRC_ConectarServidor()
- {
- BotIDs[0] = IRC_Connect(IRC_SERVIDOR,IRC_PORTA,BOT1NOMEPRINCIPAL,BOT1NOMEREAL,BOT1NOMEDEUSUARIO,false);
- IRC_SetIntData(BotIDs[0], E_IRC_CONNECT_DELAY, 02);
- BotIDs[1] = IRC_Connect(IRC_SERVIDOR,IRC_PORTA,BOT2NOMEPRINCIPAL,BOT2NOMEREAL,BOT2NOMEDEUSUARIO,false);
- IRC_SetIntData(BotIDs[1], E_IRC_CONNECT_DELAY,05);
- GrupoID = IRC_CreateGroup();
- return 1;
- }
- //==============================================================================
- public IRC_DesconectarServidor()
- {
- IRC_Quit(BotIDs[0], "Server Closed");
- IRC_Quit(BotIDs[1], "Server Closed");
- IRC_DestroyGroup(GrupoID);
- return 1;
- }
- // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- // Coloque em OnGameModeInit IRC_ConectarServidor();
- // Coloque em OnGameModeExit IRC_DesconectarServidor();
- // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- //==============================================================================
- IRCCMD:m(botid, channel[], user[], host[], params[])
- {
- new Texto[100],MsgNoChat[150];
- if(!IRC_IsVoice(botid, channel, user))return IRC_GroupSay(GrupoID, channel,"04ERROR: You need to be Voice to use this command!");
- if(sscanf(params,"s[100]",Texto))return IRC_GroupSay(GrupoID, channel,"04USAGE: !m [text]");
- format(MsgNoChat,sizeof(MsgNoChat),"31Message send:00 %s",Texto);
- IRC_GroupSay(GrupoID, channel,MsgNoChat);
- format(MsgNoChat,sizeof(MsgNoChat),"*** %s on IRC: %s",user,Texto);
- SendClientMessageToAll(-1,MsgNoChat);
- printf("[IRC Msg] %s (%s): %s",user,channel,Texto);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement