10.07.2013, 08:28
Quote:
I had just tested this and it works fine for me. Maybe you are inputting the wrong key for the channels? Alternatively, invite-only may be enabled on the channel, the bot won't be able to join (even with a valid key) unless it is invited into the channel.
|
pawn Код:
public IRC_OnConnect(botid, ip[], port)
{
new string[96];
printf("[IRC] - IRC_OnConnect: Bot id: %d Has Connected To %s: %d", botid, ip, port);
IRC_AddToGroup(gGroupID, botid);
if( botid < MAX_IRC_BOTS )
{
format(string, sizeof(string), "ghost %s "#IRC_BOT_PASSWORD"", gBotNames[botid - 1]);
IRC_SendRaw(botid, string);
}
IRC_SendRaw(botid, ":PRIVMSG NickServ IDENTIFY "#IRC_BOT_PASSWORD"");
IRC_Say(botid, "NickServ", "IDENTIFY "#IRC_BOT_PASSWORD"");
IRC_JoinChannel(botid, IRC_CHANNEL);
IRC_JoinChannel(botid, ECHO_IRC_CHANNEL);
IRC_JoinChannel(botid, ADMIN_IRC_CHANNEL, IRC_BOT_ADMIN_CHAN_KEY); // bots aren't identified fast enough, remember to fix this.
IRC_SendRaw(botid, "JOIN "#ADMIN_IRC_CHANNEL" "#IRC_BOT_PASSWORD"");
return 1;
}
and it works without the password
pawn Код:
public IRC_OnInvitedToChannel(botid, channel[], invitinguser[], invitinghost[])
{
printf("*** IRC_OnInvitedToChannel: Bot ID %d invited to channel %s by %s (%s)", botid, channel, invitinguser, invitinghost);
if(strfind(channel, IRC_CHANNEL, true) != -1)
{
IRC_JoinChannel(botid, channel);
}
return 1;
}