BeBot - An Anarchy Online and Age Of Conan chat automaton

Archive => Anarchy Online Archive => BeBot 0.4 support => Topic started by: Diablo on August 03, 2007, 10:46:56 pm

Title: Multi bot db setup.
Post by: Diablo on August 03, 2007, 10:46:56 pm
Hello I am running several bots that are linked and using the same db but i need to know what to set the tables prefixes and master tablenames for the bots. They are using same database and i have the table prefixes set to the bots name. Just not sure the proper way to set these up. Do i need to set each botname for the master_tablename also. Thanks
Title: Re: Mulit bot db setup.
Post by: Diablo on August 03, 2007, 10:59:15 pm
Also wanted to make sure this is the only way to have it so online shows who is on from all the linked orgs.
Title: Re: Multi bot db setup.
Post by: Nytridr on August 04, 2007, 09:44:16 am
what I do is in bot.conf is just name it what the bots name is.. and then in <botname>_tablenames  is where you can set it for each bot in the DB to either share the table or not.  I have most of mine sharing except for the security stuff, members, ext.. and it seems to work well for me.

Like blacklist, online, ban, and so on I have removed in the tablename table the bot name and instead of true I put in false. and to show all the people across all bots that use the shared db do !settings online and you will see the setting for it.
Title: Re: Multi bot db setup.
Post by: Alreadythere on August 04, 2007, 10:52:01 am
Easiest way to do this is just setup your account info in Bot.conf, enter the information about the MySQL server in the MySQL.conf, and comment out $table_prefix and $master_tablename by putting // in front of the lines. That way the bot will automatically use $botname as prefix, and $botname_mastertable as mastertable.

With those settings just let all bots use the same database and then do /tell bot1 !set Online OtherBots bot2,bot3,bot4, while replacing the names with the names of your bots. Just make sure you don't include the name of the bot you are currently setting up in the otherbots list.
Title: Re: Multi bot db setup.
Post by: Diablo on August 05, 2007, 07:27:10 pm
So alreadytheres way would show every org linked on the online list and the security settings would be ok. Thanks
Title: Re: Multi bot db setup.
Post by: Alreadythere on August 05, 2007, 07:37:29 pm
Not sure what you mean about security - each bot will have it's own security.
Title: Re: Multi bot db setup.
Post by: Diablo on August 05, 2007, 07:42:08 pm
Ok thats what i was wondering just wanted to make sure they didnt share the same settings.
Title: Re: Multi bot db setup.
Post by: Diablo on August 06, 2007, 02:13:35 am
Ok i set everything up that way by commenting out the last two but i still cant see the linked bots org in the online list. Do i need the comma at the end of the bot list for the online part? They are using the same db name so not sure what else i could be missing. I added the relay bot in settings, is there anywhere else i should list it. Do i need to add the three bots to the ignore list in the bot.conf file?
Title: Re: Multi bot db setup.
Post by: Alreadythere on August 06, 2007, 10:48:21 am
If the bots share a database and you have set OtherBots correctly it should work. And no, you don't need a comma at the end of OtherBots, though it shouldn't harm as the online only uses valid character names in the OtherBots list.
Title: Re: Multi bot db setup.
Post by: kuznechik on August 06, 2007, 03:59:12 pm
Well, only problem with few bots sharing one DB for online is that it wipes online list every now and then, i.e. you start 1st bot, it marks all as offline and then get all online people marked as on in 1st org. Then second bot goes in and repeats. As result every1 in 1st org will be marked offline.

P.S.: Not checked how 0.4 acting now, 0.3 experience here, I ended up modifying online module a little adding org column to table and every bot was operating only his own org in online list.
Title: Re: Multi bot db setup.
Post by: Alreadythere on August 06, 2007, 04:34:02 pm
That's been a bug, it's fixed in 0.4.
Title: Re: Multi bot db setup.
Post by: Diablo on August 06, 2007, 07:28:14 pm
I noticed it shows all the bots in the online list since they were made members of it. Do i need to add them to notify list or something? Do I need to add the other bots to ignore lists or will that affect relay? Should the relaybot be set as raidbot or guild and does it need to be in one of the orgs? Thanks
Title: Re: Multi bot db setup.
Post by: Alreadythere on August 06, 2007, 10:29:29 pm
I noticed it shows all the bots in the online list since they were made members of it. Do i need to add them to notify list or something?
Which online list? Notify in which bot? The relaying bots don't need to be in the members list of each other, adding to guest list or some special security group with enough rights is sufficient.

Do I need to add the other bots to ignore lists or will that affect relay?
That would affect relaying, see above. The receiving bot needs to allow all possible sending bots to call the command !gcr.

Should the relaybot be set as raidbot or guild and does it need to be in one of the orgs?
Easiest is to create a pure raidbot, strip down to a minimum of modules, and have it handle nothing else. The bots in the relay need to be on autoinvite of the relaybot, and then just set in the org bots relay:relay to the name of the inviting bot.
Title: Re: Multi bot db setup.
Post by: Ebag333 on August 06, 2007, 11:54:16 pm
Make sure you disable as many commands as possible on the relaybot, you really don't want people being able to !join it as they can see all chat in there. :)

If you use the relay bot, you can actually set it up to relay many different orgs to each other.  IE: you have orgs A, B, C, D, and E.  Org's A and B can see each other (because Org A's bot has allowed Org B's bot access to !gcr and vice-versa), same for org's C and D, and org E see's everyone (but can't talk back to them because no one has given org E's bot access to !gcr).

If that doesn't make sense to you, and you only need to setup a 2 bot relay, just use the old tells.  Though using a relay bot *IS* much faster, and keeps the bot from being too laggy.
Title: Re: Multi bot db setup.
Post by: Diablo on August 07, 2007, 12:18:03 am
I have 3 org bots and one relay bot. They are set to relay everything to each other so everyone see all chat and can talk back. When you do !online in bot1 it shows bot1 org online not the other two orgs. It does show bot2 and bot3 in the online list as well as the relay bot. I have set all the bots as members to each others bots. What i want is when you do !online in bot1 or bot2 etc. to show everyone who is online from bot1,bot2,and bot3. I have set them all to same db and them all up in the otherbot settings. But the !online still only shows online from the bot is was sent from.

Also confused on the gcr help it says to download relay.php and turn off the other two this is not needed right. I had read in forum that its already been put in files.
If it would help maybe someone could help me make sure its setup right. Thanks
Title: Re: Multi bot db setup.
Post by: Ebag333 on August 07, 2007, 03:47:22 am
Don't worry about the help comment, that's older from when we had multiple relay plugins.

As for online, check: !settings online

There's a place in there to set what bots online lists you want to pull from (assuming all bots use the same online table).
Title: Re: Multi bot db setup.
Post by: Diablo on August 07, 2007, 03:55:03 am
Yea i checked those are set right. i commented out the last two options in mysql settings. That should make them all use same table right.
Title: Re: Multi bot db setup.
Post by: Diablo on August 10, 2007, 02:51:14 pm
Instead of commenting out the $table_prefix and $master_tablename should i just make them the same name like "bot1" and "bot1_tablenames"? I gone through all the other settings several times and they all seem ok its just like its not reading the same tables for online?
Title: Re: Multi bot db setup.
Post by: Alreadythere on August 10, 2007, 03:05:04 pm
Are you sure your bots are all using the same database?
Title: Re: Multi bot db setup.
Post by: Diablo on August 10, 2007, 03:08:35 pm
Yes just checked all three bots and they are using same db. Should the relaybot be using it too dont think that would affect it but never know?
Title: Re: Multi bot db setup.
Post by: Alreadythere on August 10, 2007, 03:41:37 pm
I prefer using just one database, but no, the relay bot shouldn't affect anything there.

Do you have more then one online table? Or just one global one?
Title: Re: Multi bot db setup.
Post by: Temar on August 10, 2007, 03:55:20 pm
i think by default the online table is seperate
to change to share online table you need to
you need to go on table botname_tablenames
find internal name online and change use prefix to false
for each of your bots
then restart your bots

i think this should be change to default false as it doesnt matter about shared online table with seperate bots as bots will ignore other names not set to there bot unless told to
Title: Re: Multi bot db setup.
Post by: Diablo on August 10, 2007, 04:06:18 pm
Yes i checked the tables and they are seperated by bots and i have three different bots_online tables.
Title: Re: Multi bot db setup.
Post by: Alreadythere on August 10, 2007, 04:11:46 pm
The default for the online table is one global online table, not one per bot. Pretty sure it was like that since the module got added.

But that's your problem, you have to change your setup to only use one global online table. Read Temar's post above how to do that.
Title: Re: Multi bot db setup.
Post by: Diablo on August 10, 2007, 04:12:53 pm
Ok um is that in the onlinedb.php where its $db -> define_tablename("online", "false")."
Thats how its set now.
Title: Re: Multi bot db setup.
Post by: Alreadythere on August 10, 2007, 04:14:03 pm
That's how it should look like.

But to get it to work you have either to remove the entries for the online table from the master tables of your bots, or do the editing Temar posted.

Edit: Both changes require a restart of your bot.
Title: Re: Multi bot db setup.
Post by: Diablo on August 10, 2007, 04:36:52 pm
So im supposed to change the onlinedb file in the core folder correct. It was set as false already when i opened it. Or do i edit the table itself under bots_tablenames?
Title: Re: Multi bot db setup.
Post by: Diablo on August 10, 2007, 04:59:48 pm
Ok i found in the mysql.php file , use_prefix VARCHAR (10) NOT NULL DEFAULT 'false')");

thats how all three bots where set by default.
Title: Re: Multi bot db setup.
Post by: Alreadythere on August 10, 2007, 05:05:46 pm
You have to modify the 3 bot_tablenames tables, best remove the entries for the online tables by doing DELETE FROM bot_tablenames WHERE internal_name = 'online'. Or use some tool like phpMyAdmin to edit the entries, and set use_prefix to talse.

Don't edit your MySQL.php or OnlineDB.php files, that's not needed.
Title: Re: Multi bot db setup.
Post by: Temar on August 10, 2007, 05:06:14 pm
false is what we want to be
after some testing
i removed botname_online
i removed online entry from botname_tablenames
restarted bot
and it made a table online
so that works
but then i added a new bot so it did the entire new bot add tables etc
i ended up with botname_online :/
Title: Re: Multi bot db setup.
Post by: Diablo on August 10, 2007, 05:08:12 pm
Yea i looked at the table itself and its setting it to true when the php file is set to false. So if i change the table to false it wont change back to true im guessing?
Title: Re: Multi bot db setup.
Post by: Temar on August 10, 2007, 05:09:52 pm
so yer there apears to be a bug
but to fix ur bots now just edit the mysql tables :D easy
Title: Re: Multi bot db setup.
Post by: Alreadythere on August 10, 2007, 05:23:01 pm
It was a bug, the constructor was called before CREATE TABLE and tried to do stuff on #___online without defining the table - which meant it was added on default as using a prefix. Moved stuff around, grab corrected file here (http://svn.shadow-realm.org/index.py/BeBot/branches/0.4/core/OnlineDB.php?revision=902). With that file just removing the entries in the bot_tablenames table and restarting bot should resolve your problem.
Title: Re: Multi bot db setup.
Post by: Diablo on August 10, 2007, 05:26:11 pm
Ok got it working now thxs for help just changed the tables and rebooted they work great.
SimplePortal 2.3.7 © 2008-2024, SimplePortal