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: 0.2 to 0.3/0.4 upgrade  (Read 3929 times)

0 Members and 3 Guests are viewing this topic.

Offline Glarawyn

  • BeBot Hero
  • ******
  • Posts: 521
  • Karma: +0/-0
0.2 to 0.3/0.4 upgrade
« on: May 01, 2007, 11:25:17 pm »
Has anyone thought about how to go about importing a BeBot 0.2 database into BeBot 0.3/0.4?

A quick look at the tables in one of the org bots I run...
admin_groups
admin_members
alts
auto_msg
guests
logon
members
news
org_city
raid_points
settings
tower_attack
tower_result
whois

whois: If a whois table exists I think it would be best to drop it and recreate if it doesn't match the whois table schema for 0.3/0.4.

admin_groups & admin_members: This could possibly be imported into security, but given the huge change my vote is to have users recreate their security from scratch.

alts: This should be imported.

auto_msg: Safe to ignore.

guests: Could go either way.

logon: Should be imported, perhaps give logon messages a player note class instead of it's own table?

members: Safe to ignore for org bots, but raid bots would want this imported.

news: Import.

org_city: Import.

raid_points: Import.

settings: Ignore.

tower_attack & tower_result: Import. (Could these be global tables for all bots?

Offline Blueeagle

  • Omnipotent
  • BeBot Hero
  • ******
  • Posts: 323
  • Karma: +0/-0
Re: 0.2 to 0.3/0.4 upgrade
« Reply #1 on: May 02, 2007, 12:50:41 am »
I am thinking about an upgrade/setup script and I've been toying with the idea. That way the only thing you need to configure out-of-bot is ao-username/password and owner. It is possible to specify and save values for all other settings using in-game interface(s).

Wether or not this would be easier is another matter.

I am thinking a sequence like this.

* User modifies settings.conf.php setting the bot username, password and owner.
* User starts the bot and the bots logs in using those credentials
* When bot logs in it detects that it has not been set up and sends a tell to owner with a basic information screen that guides the owner trough setting up the mysql host, user, password. DB prefixes and guild if it's a guild bot or flexible access control if it's a raid bot.

In the last step here it's possible to detect old db schemaes (ie. detect the format of the old bot.conf file or such) and backup and upgrade as appropriate.

For this we should probably have a separate setup folder as some custom modules would probably like to have dedicated configuration screens in the bot. I am thinking a structure like:

setup/firstrun
setup/firstrun/bot.php   <= handles bot setup like default access control and modules to load/not load at startup
setup/firstrun/mysql.php <= handles the database stuff
setup/upgrade
setup/upgrade/bot.php <= this will determine if the bot is started for the first time after an upgrade (or something like that)
setup/upgrade/whois.php <= upgrade db schema
setup/upgrade/tower_attack.php <= or some other modules that needs processing during an upgrade.
setup/modules
setup/modules/irc.php <= irc relay setup script
setup/modules/colors.php <= set up colors
setup/processed <= after a setup step is completed the setup script might be moved here for safe keeping. Or another flag could be raised to detect setup has been done for the module instead


This will require a lot of work, and at the current pace it will take atleast three to four months for this to be tested and somewhat stable. Thus I am thinking this might be best left to 0.4 -> 0.6 or so.

The only problem that can't be solved by adding another wrapper is having too many wrappers.

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: 0.2 to 0.3/0.4 upgrade
« Reply #2 on: May 02, 2007, 10:01:02 am »
tower_attack & tower_result: Import. (Could these be global tables for all bots?
Yes it is possible, you just have to make sure only one bot adds entries to the tables.

Perhaps there should be some script moving the 0.2 tables to the 0.3/0.4 versions. For some tables (guest, members) a true conversion is needed, for others like alts, raid_points, logon, news, org_city the tables just need to be renamed to prefix_oldname.

Making a script converting guests and members and renaming other needed tables based on the bot config files wouldn't be that hard really.

Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
Re: 0.2 to 0.3/0.4 upgrade
« Reply #3 on: May 06, 2007, 12:52:07 am »
I propose having a "master" setting for use when there are multiple bots in a shared database. I'm not sure if there is anything else than the tower module that would benefit offhand.
BeBot Founder and Fixer Kingpin

 

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