IRC Bot problem - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: IRC Bot problem (
/showthread.php?tid=451806)
IRC Bot problem -
RedFusion - 18.07.2013
I have about 5 bots connected to the channel but only 1 communicates..
pawn Код:
public OnGameModeInit()
{
for(new bot = 0; bot < MAX_BOTS; bot++)
{
new nickname[16], realname[16];
format(nickname, sizeof(nickname), "%s", BotNames[bot]);
format(realname, sizeof(realname), "BOT_%i", bot);
irc_Bot[bot] = IRC_Connect(IRC_SERVER, IRC_PORT, nickname, realname, nickname);
}
irc_Group = IRC_CreateGroup();
}
public IRC_OnConnect(botid, ip[], port)
{
IRC_JoinChannel(botid, IRC_CHANNEL);
IRC_AddToGroup(irc_Group, botid);
return 1;
}
Re: IRC Bot problem -
Scenario - 18.07.2013
What do you mean my communicates? Wherever you have IRC_Say, it will determine which bot is supposed to be receiving things from the SA:MP server.
Re: IRC Bot problem -
RedFusion - 18.07.2013
Example:
pawn Код:
public OnPlayerText(playerid, text[])
{
new string[128], name[MAX_PLAYER_NAME+1];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), ""IRC_ORANGE"%s"IRC_BLACK": %s", name, text);
IRC_GroupSay(irc_Group, IRC_CHANNEL, string);
return 1;
}
1 Bot sends everything, and recieves a flood kick after a while
I remember reading somewhere that it's supposed to distribute the messages to all the bots to prevent that.
Re: IRC Bot problem -
Scenario - 18.07.2013
I think you can change the settings for IRC bots on your server so they are void from flood kicks...
Re: IRC Bot problem -
RedFusion - 18.07.2013
I'd rather distribute the messages for all the bots as i said, though.
I have seen it on other channels