collapse collapse
* User Info
 
 
Welcome, Guest. Please login or register.
* Search

* Board Stats
  • stats Total Members: 989
  • stats Total Posts: 18366
  • stats Total Topics: 2501
  • stats Total Categories: 7
  • stats Total Boards: 35
  • stats Most Online: 1144

Author Topic: How to relay to multiple org bots?  (Read 31520 times)

0 Members and 1 Guest are viewing this topic.

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: How to relay to multiple org bots?
« Reply #30 on: April 15, 2009, 03:24:34 pm »
Let's say it's something like #12345 on my todo list ;)

Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
Re: How to relay to multiple org bots?
« Reply #31 on: April 15, 2009, 03:29:11 pm »
Great job.

I'll look closer at it later, but offhand i would like to have a mention alongside the tells mentioning that you run the risk of having your bot banned with no warning by Funcom by using tells relay. It probably should be ripped out of the bot altogether.
BeBot Founder and Fixer Kingpin

Offline Pigtail

  • BeBot Rookie
  • *
  • Posts: 14
  • Karma: +0/-0
Re: How to relay to multiple org bots?
« Reply #32 on: April 15, 2009, 03:52:24 pm »
Aye, added that remark to the guide. I didn't even know you could have your bot banished for tell-relays. Glad I convinced my org to switching to a pgroup-relay ;)

Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
Re: How to relay to multiple org bots?
« Reply #33 on: April 15, 2009, 07:29:33 pm »
Ok. I've had the time to take a closer look at this, and attempted to follow the relay pgroup guide to the letter :)

First off i would recommend enclosing all botnames using "" or <> to make sure they stand out properly. I actually found myself pasting
Code: [Select]
/tell org1bot !set Relay Relay rbot

Directly causing me to set relay bot to rbot :P

Code: [Select]
/tell org1bot addgroup relaybots All bots from which we want to receive messages
/tell org1bot admin group add relaybots

This section is missing command prefix, and also the second line does not make any sense to me, then again i might be missing something.

Overall, great guide and i have to say i really appreciate you taking the time to clean it up :)

I did not end up with a working relay, but i have not had time to investigate why as of yet. Bots would join, and online updates where sent. But for some reason unknown to me, one of the bots simply refused to relay orgchat despite settings being correct.

Final note, which i almost forgot and is another reason tell relay should just be removed from the bot:
Tells are:
1) Throttled, meaning that if you send several tells in rapid succession, you will see tells being slowed down by the chatserver (or at least AO client, but i do believe the enforcement is serverside)
2) After x tells in x seconds, the chatserver starts simply dropping tells. In any guild with say more than 5 events every 10 seconds this means you will have loss of information occuring.
« Last Edit: April 15, 2009, 07:32:19 pm by Khalem »
BeBot Founder and Fixer Kingpin

Offline Pigtail

  • BeBot Rookie
  • *
  • Posts: 14
  • Karma: +0/-0
Re: How to relay to multiple org bots?
« Reply #34 on: April 16, 2009, 08:48:25 am »
Hallo Khalem!

Thanks for taking thetime and cross-checking the guide. I really appreciate it.

First off i would recommend enclosing all botnames using "" or <> to make sure they stand out properly. I actually found myself pasting
Code: [Select]
/tell org1bot !set Relay Relay rbot

Directly causing me to set relay bot to rbot :P

Okay, done that. I actually did the same once. Guess it's better this way ;D

Code: [Select]
/tell org1bot addgroup relaybots All bots from which we want to receive messages
/tell org1bot admin group add relaybots

This section is missing command prefix, and also the second line does not make any sense to me, then again i might be missing something.

*yikes* added the missing exclamation marks, thanks. As for the second line... I found the group after a simple "!addgroup" not being listed with "!security levels". Only after I did that "!admon group add relaybots" was I able to see and change the access level for the group. Might as well have been a bug or other mistake on my side. I'll look into it this evening and check if it's really necessary or not. Thanks for pointing it out, because people could get an error if the group already existed. Nothing you would like a guide to produce ;)

I did not end up with a working relay, but i have not had time to investigate why as of yet. Bots would join, and online updates where sent. But for some reason unknown to me, one of the bots simply refused to relay orgchat despite settings being correct.

Please let me know if you found the reason. I wrote this  guide while I was configuring all my 4 bots + 1 relay. When all was working, I kind of followed my own guide step by step then and corrected it until it worked. But it might very well be that something really is amiss. After all I set several options directly via MySQL, because I was too lazy to look up how to set them via tells  ::) I might have screwed some things up there...

Final note, which i almost forgot and is another reason tell relay should just be removed from the bot:
Tells are:
1) Throttled, meaning that if you send several tells in rapid succession, you will see tells being slowed down by the chatserver (or at least AO client, but i do believe the enforcement is serverside)
2) After x tells in x seconds, the chatserver starts simply dropping tells. In any guild with say more than 5 events every 10 seconds this means you will have loss of information occuring.

I added exactly this to a footnote in the tell-relay. If this won't convince people to use pgroups, I don't know what will ;) I just don't think not describing tell- and irc-relays in detail will do any good. Better to have documented all the drawbacks, so people can decide for themselves.

- Pigtail

Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
Re: How to relay to multiple org bots?
« Reply #35 on: April 18, 2009, 03:36:42 pm »
No idea why it wouldn't work properly first time around, but it works flawlessly now.

In case anyone wants to play around with a small change I've made to the relay allowing the names of someones main character to be suffixed to the character they are on when relaying text.

Ie, when I'm on an alt, others on the relay will see him like this:
Alt (Khalem): text

Also added a setting to truncate the main's name with default of 6 characters.

Diff:
http://bazaar.launchpad.net/~bebot-devel/bebot/stable-0.6/revision/14

Full file:
http://bazaar.launchpad.net/~bebot-devel/bebot/stable-0.6/annotate/head%3A/modules/Relay.php
BeBot Founder and Fixer Kingpin

Offline Pigtail

  • BeBot Rookie
  • *
  • Posts: 14
  • Karma: +0/-0
Re: How to relay to multiple org bots?
« Reply #36 on: May 07, 2009, 08:57:55 am »
Hiya!

I'm glad to hear all works well now. After several weeks of illness, I'm finally back and already started coding  a module that syncs the online-list of all bots in the relay. It's not perfect, but it works. The only problem I have is that there's no hook for "joining a private group". I can react to the relay-invite, but not  to the join. So I had to change Relay.php and add a call to my own module. Would maybe be nicer to add that hook to the AOChat-lib.

Anyway... the basic idea is that all connected bots issua commands like this on the private group:

Code: [Select]
[relay] org1bot: !onlinelist user:Pigtail where:gc status:1
when I join the guildchat (aka coming online) and

Code: [Select]
[relay] org1bot: !onlinelist user:Pigtail where:pg status:0
when I leave the private group of a bot. When a bot enters the relay-chat, it ask all bots to clear the online-list for this bot and then sends who's online right now. Afterwards, itasks the other bots to send theironlinelist, too, so everyone is in sync. This looks like this:

Code: [Select]
[relay] org1bot: !onlinelist clear
[relay] org1bot: !onlinelist user:Pigtail where:pg status:1
[relay] org1bot: !onlinelist user:Foobar where:pg:1
[relay] org1bot: !onlinelist updateme

[relay] org2bot: !onlinelist clear
[relay] org2bot: !onlinelist user:Piggyfix where:gc status:1

[relay] org3bot: !onlinelist clear
[relay] org3bot: !onlinelist user:Pigtestsx where:gc status:1
[relay] org3bot: !onlinelist user:Pigtestsmore where:gc status:1
[relay] org3bot: !onlinelist user:Pigohpig where:gc status:1

Every bot stores the onlinelist in its database and sets it according to the bot who sent the !onlinelist. So after setting OtherBots, even !online sort of works (sort of, because the output is a mess since private groups shwo up double), which I overcameby enhancing the OnlineDisplay.php as well.
I'm using this module for 4 connected bots now and it works like a charm. Right now, it can generate a lot of messages when a bot restarts which is why I'm thinking about bundling those messages with user:a,b,c,d and so on. Any thoughts on this or maybe even only on adding a hook to joining a channel (that is sending the join-package)?
Also, I had to modify OnlineDisplay.php so it has another group "XX On Other Bots". I wonder why no one has ever done that before. The current sharing of online-lists with using a DB looks terribly without having an own group and shows a lot of things more than once. Anyone wants to take a look at my proposed changes?

Cheerio

- Pigtail

Offline Temar

  • Contributor
  • *******
  • Posts: 1140
  • Karma: +0/-0
    • AoFiles
Re: How to relay to multiple org bots?
« Reply #37 on: May 07, 2009, 08:22:34 pm »
i have already done this for my bots i have it posted here
and has already been added to the official BeBot
http://bebot.link/0-6-x-customunofficial-modules/public-relay/
« Last Edit: May 08, 2009, 05:14:23 am by Temar »

Offline Pigtail

  • BeBot Rookie
  • *
  • Posts: 14
  • Karma: +0/-0
Re: How to relay to multiple org bots?
« Reply #38 on: May 08, 2009, 08:35:40 am »
Hey Temar!

Now I'm feeling a bit stupid, but since AlreadyThere wrote that someone needs to work on online-sync, I simply assumed, there was no solution around at all. Funny thing is, you and me ended up with the same solution, only my approach was to use a module of its own instead of modifying Relay.php. Well, thanks to your code, I finally learned about extpgjoin-event, so I don't even need to touch Relay.php at all anymore *cheers*

Since you have already committed these enhancements, there's no need for me to keep working on my module any more. You might want to do a $this -> bot -> core("whois") -> lookup (<person who joined>) though whenever the bot is told about someone joining pg or gc.
Forgive my double-coding *puts on his hat of shame +3*

- Pigtail

 

* Recent Posts
Com bot module by bitnykk
[November 25, 2024, 05:36:11 pm ]


0.8.x updates for AO by bitnykk
[June 23, 2024, 03:19:47 pm ]


0.8.x updates for AoC by bitnykk
[June 23, 2024, 03:19:44 pm ]


[AoC] special char for items module by bitnykk
[February 09, 2024, 09:41:18 pm ]


BeBot still alive & kicking ! by bitnykk
[December 17, 2023, 12:58:44 am ]

* Who's Online
  • Dot Guests: 196
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.
* Forum Staff
bitnykk admin bitnykk
Administrator
Khalem admin Khalem
Administrator
WeZoN gmod WeZoN
Global Moderator
SimplePortal 2.3.7 © 2008-2024, SimplePortal