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: error messages between bots  (Read 14761 times)

0 Members and 1 Guest are viewing this topic.

Offline Tyrence

  • BeBot User
  • **
  • Posts: 41
  • Karma: +0/-0
error messages between bots
« on: June 08, 2010, 09:16:45 pm »
I run a few bots, some of them pull info from other bots.  Occasionally I see tell loops happening that look something like this:

bot1: I only listen to members of this bot.
bot2: Unknown command or access denied!
bot1: I only listen to members of this bot.
bot2: Unknown command or access denied!
bot1: I only listen to members of this bot.
bot2: Unknown command or access denied!

....


I would like to propose prefixing all error messages with "Error!" to make it easier to recognize those messages and ignore them.

For instance,
"I only listen to members of this bot." becomes "Error! I only listen to members of this bot".
"Unknown command or access denied!" becomes "Error! Unknown command or access denied!".
"Syntax Error!" becomes "Error! Check your syntax"
etc.

I've posted this in Vhabot, Bebot, and Budabot forums in the hopes that all bots will adopt :)

I plan on implementing this in Budabot, but if you have suggestions on a better way to do it, I'd like to hear them.

vhabot: http://forums.vhabot.net/index.php/board,21.0.html
budabot: http://budabot.com/forum/viewtopic.php?f=7&t=146
« Last Edit: June 08, 2010, 09:18:41 pm by Tyrence »

Offline rmb

  • BeBot User
  • **
  • Posts: 33
  • Karma: +0/-0
Re: error messages between bots
« Reply #1 on: June 08, 2010, 11:24:09 pm »
To me it looks like exaggeration.
I mean if bot2 have enough rights on bot1 then notthing would ever happen.


Why make a change if you can prevent the problem using existing features?

Offline Tyrence

  • BeBot User
  • **
  • Posts: 41
  • Karma: +0/-0
Re: error messages between bots
« Reply #2 on: June 09, 2010, 12:18:55 am »
Well, right, if you always send and receive good data, and your syntax is always right, and the permissions are always right, and the settings are always right, and the correct modules are always installed, and the bot is never updated, and the database never gets corrupted or erased, and the bot is never moved to a new hosting location where any of these could happen, then yeah I agree, this isn't needed.

If your bot never sends or receives messages from other bots, then this isn't needed either.

On Rk2, especially omni side, we have a lot of bots that connect with each other.  All hosted by different people.  Some are budabot, some are bebot, some vhabot.  I run into this issue all the time.  I know of bots that were stuck in a loop like this for months, and it caused the bots to be very slow.  They still worked tho, due to the tell queue preventing the bots from being overloaded, so everyone just assumed it was an FC problem....

It would be nice if I was admin on all those bots so I could configure rights on all of them.  But I'm not, so when there needs to be a change made, sometimes I have to wait a while for the bot admin to log in.

Like you said, there are other ways.  Currently I add regex to filter those messages.  And then when I see a new message that isn't filtered I go in and add another regex to match it.  And yeah, it works, but that brings us full circle to "why hack a solution when there's a better way?"

Maybe this is just an RK2 Omni problem, but I doubt it....

Offline rmb

  • BeBot User
  • **
  • Posts: 33
  • Karma: +0/-0
Re: error messages between bots
« Reply #3 on: June 09, 2010, 09:27:26 am »
I'm not even a beginner programmer so it may be a heresy but from what I know one should never auto-ignore all error messages.
If there is an error message then you should look at it and act accordingly. It may mean ignoring it in 99% but it also may be that one critical issue that needs your attention.

I do not know if using regular expressions is the best way to solve this problem, but it looks like a right direction – effectively you program your bot to react in a certain way on certain messages.
It may sound dull because you mostly ignore them, but it is the right way.



Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
Re: error messages between bots
« Reply #4 on: June 09, 2010, 05:13:45 pm »
*nixes the long winded reply he typed up*

I think this has the potential to work, but I would prefer a different implementation.

First off, with localization eventually coming to BeBot, you will not be assured that "Error!" is the string you will get back, it could just as well be "Feil!", "Fehler!"  and so forth. Which in turns means your back to multiple string checks again, and thus back at square one.
As such, a prefix consisting of two or three characters would be prefered instead.

In order for this to be workable without being annoying to users, one would have to use another  prefix when sending the message so that the bot knows it is responding to a bot, and thus prefix the access denied and unknown command errors. This allows it to work regardless of the language used on the bot.

This is just off the top of my head, but my initial thoughts.


BeBot Founder and Fixer Kingpin

Offline Tyrence

  • BeBot User
  • **
  • Posts: 41
  • Karma: +0/-0
Re: error messages between bots
« Reply #5 on: June 09, 2010, 06:15:23 pm »
hmm, yeah, localization will kill this.....

I don't think a lot of times the bot knows it is talking to another bot, so I don't know that that would work either without a lot of reworking.

What if we just used a symbol at the beginning, like an asterisk.  eg:
Quote
*Error! I am only responding...
Quote
*Feil! ....

You could even 'hide' it so it more or less looks normal.....

Quote
*Error* I am only responding...
Quote
*Feil* ....

 

* 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: 278
  • 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