Bot Linking

From PurpleIRC
Jump to: navigation, search

PurpleIRC allows linking of several bots together to provide players the ability to send private messages across servers.

To use this feature first enable bot linking for each bot via the bot-linking-enabled option in the bot yml file.

bot-linking-enabled: true

Once the option is enabled the rest of the configuration is done in-game via the /irc link command. In the example below we have two bots.

  • BotA
  • BotB

From console of BotA run the link command. This will send a request to BotB.

>irc link
[07:43:02 INFO]: Usage: /irc link [bot1] [bot2] ([secret])
>irc link BotA BotB
[07:43:19 INFO]: [PurpleIRC] Saving bot-link: BotB
[07:43:19 INFO]: Link request sent to BotB

From the BotB console use linkaccept command to complete the link.

[07:43:19 INFO]: PurpleIRC bot link request from BotA
[07:43:19 INFO]: To accept: /irc linkaccept BotB BotA
>irc linkaccept BotB BotA
[07:43:33 INFO]: [PurpleIRC] Saving bot-link: BotA
[07:43:33 INFO]: Now linked to BotA

With the bots successfully linked players can now send messages via /irc smsg. To see a list of remote players use the /irc slist command.