Editing Relay
From Bebot Wiki 2
Jump to navigationJump to searchWarning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
Linking together several bots | Linking together several bots | ||
− | |||
'''1. The Basics''' | '''1. The Basics''' | ||
− | |||
− | |||
If you want to link several bots together, there are multiple ways to achieve this, each with its benefits and drawbacks. Read the guide thouroughly and decide for yourself, which will suit your needs. | If you want to link several bots together, there are multiple ways to achieve this, each with its benefits and drawbacks. Read the guide thouroughly and decide for yourself, which will suit your needs. | ||
Basically, for your bots to be linked, they need a fast way to communicate with all participating bots. If you only want to link 2 bots together, you can link them via “tells”. It doesn't scale though, linking more than 2 bots together via tells is not possible. If you want to link more than two bots, or might want to do so in the future, there are 3 possibilities: Either you link them together using your bot-database (only works if all bots use the same database), using irc or you use a private channel in the game. If you use IRC, keep in mind that you should secure the channel you use with a password and that, depending on the connection to the irc-server, response-time gets up a bit. Using a private channel in the game is a good alternative, but you will need a dedicated bot (a relay bot) to keep that private channel open and invite all the org/raid bots. | Basically, for your bots to be linked, they need a fast way to communicate with all participating bots. If you only want to link 2 bots together, you can link them via “tells”. It doesn't scale though, linking more than 2 bots together via tells is not possible. If you want to link more than two bots, or might want to do so in the future, there are 3 possibilities: Either you link them together using your bot-database (only works if all bots use the same database), using irc or you use a private channel in the game. If you use IRC, keep in mind that you should secure the channel you use with a password and that, depending on the connection to the irc-server, response-time gets up a bit. Using a private channel in the game is a good alternative, but you will need a dedicated bot (a relay bot) to keep that private channel open and invite all the org/raid bots. | ||
− | |||
'''2. The different setups''' | '''2. The different setups''' | ||
− | Throughout the different setups, | + | Throughout the different setups, I will speak of org-bots, and raid-bots. To make it easier, all bot-names are enclosed in <>, so please make sure you remove them when pasting/replacing with your own bots' names. |
− | |||
'''2.1 Using tells''' | '''2.1 Using tells''' | ||
− | PROS: | + | PROS: easy setup, no relay-bot needed |
+ | CONS: Only works with 2 bots, possibly illegal, tells might be dropped by the server if coming in to fast1) | ||
− | + | Using tells as relay is discouraged nowadays (and you even run the risk of having your bots banned by funcom without warning), but I will describe it shortly nonetheless. Use at your own risk! | |
− | + | Assuming you have two bots “bot1” and “bot2”, you start by allowing each bot to relay to each other. You could do a “!member add bot2” on bot1 and vice versa, but the member-list of org-bots might get wiped during roster-updates. Refer to section 2.3.2 as to how to create a new security group named “relaybots” with SUPERADMIN level on both bots and then make them member on the other bot's group. | |
− | |||
− | Assuming you have two bots “bot1” and “bot2”, you start by allowing each bot to relay to each other. You could do a “!member add bot2” on bot1 and vice versa, but the member-list of org-bots might get wiped during roster-updates. | ||
If you've done this, you let bot1 relay to bot2: | If you've done this, you let bot1 relay to bot2: | ||
Line 48: | Line 42: | ||
And that should do it. If you want to link more than 2 bots, you should think about using a relay-bot. | And that should do it. If you want to link more than 2 bots, you should think about using a relay-bot. | ||
− | |||
'''2.2 Using IRC''' | '''2.2 Using IRC''' | ||
− | PROS: scales well, no relay-bot needed, | + | PROS: scales well, no relay-bot needed, easy setup, allows linking between different game-servers and even games |
− | + | CONS: increases latency, order of messages not guaranteed, item-references will be broken, possibly insecure, doesn't look as nice as the other links | |
− | CONS: increases latency, order of messages not guaranteed, item- | ||
Before you start, please acknowledge that relaying via IRC is considered deprecated, yet it will still work. | Before you start, please acknowledge that relaying via IRC is considered deprecated, yet it will still work. | ||
Line 71: | Line 63: | ||
Of yourse you have to do the exact same settings on all bots you want to link via IRC. The main reason you might want to consider IRC ist that you can link bots from RK1, RK2 and RK3 together with bots even from AoC and WoW, it doesn't really matter. But keep in mind that IRC does not guarantee that things you send to it are relayed in the same order. You might actually read the answer to a question before someone asks it. | Of yourse you have to do the exact same settings on all bots you want to link via IRC. The main reason you might want to consider IRC ist that you can link bots from RK1, RK2 and RK3 together with bots even from AoC and WoW, it doesn't really matter. But keep in mind that IRC does not guarantee that things you send to it are relayed in the same order. You might actually read the answer to a question before someone asks it. | ||
+ | '''2.3 Using a private channel''' | ||
− | + | PROS: scales up to 1000 bots, best speed, possible sharing of online-lists if all bots are using the same DB | |
− | + | CONS: Needs a dedicated relay-bot | |
− | PROS: scales up to | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | CONS: Needs a dedicated relay-bot | ||
− | The fastest and most flexible solution is relaying via a private group. All bots you want to connect have to join the same private group and exchange messages. For this to work, we need a new type of bot, a relay-bot, which has the job of creating the private group and inviting all other bots into this group whenever necessary. The org/raid-bots on the other hand are configured much like a tell-relay. | + | The fastest and most flexible solution is relaying via a private group. All bots you want to connect have to join the same private group and exchange messages via means of !gcr. For this to work, we need a new type of bot, a relay-bot, which has the job of creating the private group and inviting all other bots into this group whenever necessary. The org/raid-bots on the other hand are configured much like a tell-relay. |
CAVEAT: Before setting up everything, create all the bots you will need and make sure that some time passes so every bot has WHOIS-information on every bot involved. This will wipe out any possible problem related to people and bots not seeing each other. | CAVEAT: Before setting up everything, create all the bots you will need and make sure that some time passes so every bot has WHOIS-information on every bot involved. This will wipe out any possible problem related to people and bots not seeing each other. | ||
− | + | '''2.3.1 Setting up the relay-bot''' | |
− | '''2. | ||
Your most important bot is the relay-bot. Its only task is to be online, create the private channel which is used for the communication between your bots and invite all bots you want to link together to this chat. Nothing more. If your relay-bot is offline, your link will be gone, though your raid/guild-bots will continue to work. Once the relay-bot comes on again and all guild/org-bots are invited, the link will work again. | Your most important bot is the relay-bot. Its only task is to be online, create the private channel which is used for the communication between your bots and invite all bots you want to link together to this chat. Nothing more. If your relay-bot is offline, your link will be gone, though your raid/guild-bots will continue to work. Once the relay-bot comes on again and all guild/org-bots are invited, the link will work again. | ||
− | The relay-bot MUST NOT BE MEMBER OF ANY ORGANISATION. Keep that in mind. It should be a totally stripped-down bot, only there to open the private group and invite the other bots, so make sure to disable as much modules as possible, since you will most likely never use them anyway and they increase the likeliness of a break-in. Stricly speaking, you only need the follwing modules once the bot is set up and all is running well: | + | The relay-bot MUST NOT BE MEMBER OF ANY ORGANISATION. Keep that in mind. It should be a totally stripped-down bot, only there to open the private group and invite the other bots., so make sure to disable as much modules as possible, since you will most likely never use them anyway and they increase the likeliness of a break-in. Stricly speaking, you only need the follwing modules once the bot is set up and all is running well: |
AccessControlUI.php | AccessControlUI.php | ||
Line 156: | Line 101: | ||
/tell rbot !set Relay Autoinvite On | /tell rbot !set Relay Autoinvite On | ||
− | + | /tell rbot !preferences default Autoinv recieve_auto_invite On | |
− | /tell rbot !preferences default Autoinv | ||
− | |||
Then you have to add all org/raid-bots as members to this bot: | Then you have to add all org/raid-bots as members to this bot: | ||
Line 176: | Line 119: | ||
/tell rbot !notify on <raidbot2> | /tell rbot !notify on <raidbot2> | ||
− | And that's about it for the relay-bot setup | + | And that's about it for the relay-bot setup. Easy, huh? |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | '''2.3.2 Setting up the org/raid-bots''' | |
− | + | On your org- and raid-bots, you will need to make them use the relaybot's private group as their private group for relaying. Configure like this: | |
− | |||
− | |||
− | |||
/tell org1bot !set Relay StrictNameCheck On | /tell org1bot !set Relay StrictNameCheck On | ||
Line 196: | Line 130: | ||
/tell org1bot !set Relay Status On | /tell org1bot !set Relay Status On | ||
− | “rbot” being the name of your relay-bot. Assuming that our Org1 is called “The proud and well-known fr00bs of Rubi Ka”, relayed messages from your guildchat would be | + | “rbot” being the name of your relay-bot. Assuming that our Org1 is called “The proud and well-known fr00bs of Rubi Ka”, relayed messages from your guildchat would be dislayed on Org2 as [Org2] Org2Bot: [The proud and well-known fr00bs of Rubi Ka] Pigtail: Test. You might want to shorten that “The proud and well-known fr00bs of Rubi Ka” a bit: |
/tell org1bot !set Relay Gcname PWF | /tell org1bot !set Relay Gcname PWF | ||
Line 202: | Line 136: | ||
The first is the name to displayed for messages relayed from your guildchat, the second one the name displayed for the private group (a.k.a. guest-chat). | The first is the name to displayed for messages relayed from your guildchat, the second one the name displayed for the private group (a.k.a. guest-chat). | ||
− | + | Now that it's done, every org/raid-bot configured like this should be in the private chat of the relaybot. If they aren't there already, either wait a bit, or join the relay-bot's private group and !invite them one by one. The only thing missing is to configure those bots to allow all linked bots to send them relay-messages via !gcr. Per default (as of 0.6.2), every member with the access level MEMBER is allowed to do this. This is the most important part of your setup as with this configuration every org or raidgroup can decide for themselves from which they want to receive messages (sadly they can't decide to whom they want to SENT). Usually every org/raid-bot wants to allow every other bot to send messages. | |
− | + | Of course we could just add every bot with “!member add”, but that would become quite messy. To keep things a bit more organized, I advise to create a new security group with the access level MEMBER. For simplicity, we call it “relaybots” and give it a good description. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | Now that it's done, every org/raid-bot | ||
− | This is the most | ||
− | |||
− | Usually every org/raid-bot wants to allow every other bot to send messages. Of course we could just add every bot with “!member add”, but that | ||
/tell org1bot !addgroup relaybots All bots from which we want to receive messages | /tell org1bot !addgroup relaybots All bots from which we want to receive messages | ||
Line 233: | Line 146: | ||
You will see that our security group has access level ANONYMOUS. If you're going for a private channel type of relay, click on the [MEMBER] next to “relaybots” to promote it to MEMBER access level. But if you're going for a direct tell type of relay, click on the [SUPERADMIN] next to “relaybots” to promote it to SUPERADMIN access level. | You will see that our security group has access level ANONYMOUS. If you're going for a private channel type of relay, click on the [MEMBER] next to “relaybots” to promote it to MEMBER access level. But if you're going for a direct tell type of relay, click on the [SUPERADMIN] next to “relaybots” to promote it to SUPERADMIN access level. | ||
− | |||
Now that it's done, we just need to add all bots we want to receive messages from to our new security group. With our current example of 3 orgbots and 2 raidbots, we'd do something like this: | Now that it's done, we just need to add all bots we want to receive messages from to our new security group. With our current example of 3 orgbots and 2 raidbots, we'd do something like this: | ||
Line 241: | Line 153: | ||
/tell org1bot !adduser <raidbot2> relaybots | /tell org1bot !adduser <raidbot2> relaybots | ||
− | Of course you need to do this on all 5 bots (but NOT on the relay-bot | + | Of course you need to do this on all 5 bots (but NOT on the relay-bot!), so it will take some time. After every bot has access to every bot, your link should work as expected and reconfigure itself after disconnects. |
Congratulations, you are done! | Congratulations, you are done! | ||
− | + | '''2.3.3 Scalability''' | |
− | '''2. | ||
If you understood what we've just configured, you might have noticed that you can use a single relay-bot to manage different guild-links. If, for example, you now decide that you want to seperate your org-link and your raid-link you can achive this by making all org-bots member of the relaybots security-group on all org-bots (but not on any raid-bot) and all raid-bots members of the security-group relaybots on all raid-bots (but not on any org-bot). This way, you can use a single relay for several totally different relay-groups. The only proble being that the bot-admin can only decide from which bot he/she wants to receive messages, but not to which bots messages should be relayed. So you have to trust each other if you really plan such a weird setup. | If you understood what we've just configured, you might have noticed that you can use a single relay-bot to manage different guild-links. If, for example, you now decide that you want to seperate your org-link and your raid-link you can achive this by making all org-bots member of the relaybots security-group on all org-bots (but not on any raid-bot) and all raid-bots members of the security-group relaybots on all raid-bots (but not on any org-bot). This way, you can use a single relay for several totally different relay-groups. The only proble being that the bot-admin can only decide from which bot he/she wants to receive messages, but not to which bots messages should be relayed. So you have to trust each other if you really plan such a weird setup. | ||
Line 251: | Line 162: | ||
Anyway, the big advantage from this whole setup we just did is that it scales nicely. No matter how many bots you add, the delay doesn't increase. The traffic depends solely on the amount of text sent, which should be totally neglectable. | Anyway, the big advantage from this whole setup we just did is that it scales nicely. No matter how many bots you add, the delay doesn't increase. The traffic depends solely on the amount of text sent, which should be totally neglectable. | ||
− | + | '''2.3.4 Sharing the online-list across several bots''' | |
− | '''2. | ||
If you are building a bot-network, you will most likely be interested in knowing who is online. And this includes all linked orgs, not just your own. Luckily, this is possible. There are two cases to consider: | If you are building a bot-network, you will most likely be interested in knowing who is online. And this includes all linked orgs, not just your own. Luckily, this is possible. There are two cases to consider: | ||
− | + | '''2.3.4.1 All bots use the same DB''' | |
− | '''2. | ||
If you want to share the online-list of all your bots, you need all org/raid-bots to use the same database. Then you only need to tell each bot about all the other bots: | If you want to share the online-list of all your bots, you need all org/raid-bots to use the same database. Then you only need to tell each bot about all the other bots: | ||
Line 269: | Line 178: | ||
Now every bot lists all the members of all bots involved. Problem solved. | Now every bot lists all the members of all bots involved. Problem solved. | ||
+ | '''2.3.4.2 At least one bot not using the same DB''' | ||
− | + | Starting from 0.6.3, the online-list of linked bots are automatically syncronized, but all bots have to run at least 0.6.3 or higher for this to work. When you meet these requirements, proceed to set OtherBots as described in 2.3.4.1. | |
− | |||
− | Starting from 0.6.3, the online-list of linked bots are automatically syncronized | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | '''2. | + | '''2.4 Using a shared database''' |
PROS: ok speed (2s delay max), sharing of online-lists, no relay-bot needed | PROS: ok speed (2s delay max), sharing of online-lists, no relay-bot needed | ||
− | |||
CONS: All bots need to be using the same database | CONS: All bots need to be using the same database | ||
Line 296: | Line 190: | ||
Keep in mind that this setup only works if all your bots are using the same database. It's can't work elsewise. | Keep in mind that this setup only works if all your bots are using the same database. It's can't work elsewise. | ||
− | First, make sure to grant each of the bots involved in your network access to each other (either by using “!member add botX” or creating a special security group for this as described in 2. | + | First, make sure to grant each of the bots involved in your network access to each other (either by using “!member add botX” or creating a special security group for this as described in 2.3.2. Now do the following (assuming there are three bots, named bot1, bot2 and bot3): |
/tell bot1 !set Relay StrictNameCheck On | /tell bot1 !set Relay StrictNameCheck On | ||
Line 318: | Line 212: | ||
And that's about it. The relaying of messages is not instant though since every bot will check for new messages to relay only once every 2 seconds. But in return you will get a shared online-list and no hassle setting it up. Enjoy! | And that's about it. The relaying of messages is not instant though since every bot will check for new messages to relay only once every 2 seconds. But in return you will get a shared online-list and no hassle setting it up. Enjoy! | ||
− | |||
'''3. Conclusion''' | '''3. Conclusion''' | ||
Line 327: | Line 220: | ||
2) Strictly speaking, it may be the member of an org, but since the relaying is done using the private group of your org-bot, you have to make sure no one besides you can access the bot's private group. So if you really know what you are doing and absolutely want to, you can actually use your org-bot as a relay, yes. I just totally not recommend it. | 2) Strictly speaking, it may be the member of an org, but since the relaying is done using the private group of your org-bot, you have to make sure no one besides you can access the bot's private group. So if you really know what you are doing and absolutely want to, you can actually use your org-bot as a relay, yes. I just totally not recommend it. | ||
− | |||
'''4. Extension''' | '''4. Extension''' | ||
− | |||
− | |||
− | |||
− | |||
You may have to connect your bot to more than one relay channel, several networks at the same time. | You may have to connect your bot to more than one relay channel, several networks at the same time. | ||
Line 341: | Line 229: | ||
Then you'll have upto five "Hrelay" (HRelay1, HRelay2, HRelay3, HRelay4 and HRelay5) available in the !settings menu. | Then you'll have upto five "Hrelay" (HRelay1, HRelay2, HRelay3, HRelay4 and HRelay5) available in the !settings menu. | ||
You can edit any by its number, for example with number 1 you do : | You can edit any by its number, for example with number 1 you do : | ||
− | + | !settings HRelay1 | |
It's then up to you to setup on the same model than described upper. | It's then up to you to setup on the same model than described upper. | ||
Usually you'd use Channel mode, as Tells will be risky with many bots, & DB mode quite unusable for bots hosted separately. | Usually you'd use Channel mode, as Tells will be risky with many bots, & DB mode quite unusable for bots hosted separately. |