L* R*
HOME FORUM DOWNLOADS
Content
  Links
     Browse SVN
     SVN Commit log
     Documentation (Wiki)
  Developers
     Taskmanager
User
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 02, 2008, 11:20:19 PM

Login with username, password and session length
Search



Advanced search
Support GoPHP5.org
BeBot - An Anarchy Online/Age Of Conan chat automaton > Forum > Development > Coding and development discussion > Topic: 0.2 to 0.3/0.4 upgrade
Pages: [1]   Go Down
« previous next »
Print
Author Topic: 0.2 to 0.3/0.4 upgrade  (Read 388 times)
0 Members and 1 Guest are viewing this topic.
Glarawyn
BeBot Developer
Champion
********
Offline Offline

Posts: 414



0.2 to 0.3/0.4 upgrade
« on: May 01, 2007, 04: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?
Logged
Blueeagle
Omnipotent
BeBot Developer
Expert
********
Offline Offline

Gender: Male
Posts: 313



Re: 0.2 to 0.3/0.4 upgrade
« Reply #1 on: May 01, 2007, 05:50:41 PM »

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.

Logged

The only problem that can't be solved by adding another wrapper is having too many wrappers.
Alreadythere
BeBot Maintainer
Administrator
Grandmaster
********
Offline Offline

Posts: 1085


Re: 0.2 to 0.3/0.4 upgrade
« Reply #2 on: May 02, 2007, 03:01:02 AM »

Quote from: Glarawyn on May 01, 2007, 04:25:17 PM
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.
Logged
Khalem
BeBot Founder
Administrator
Grandmaster
********
Offline Offline

Gender: Male
Posts: 670



WWW
Re: 0.2 to 0.3/0.4 upgrade
« Reply #3 on: May 05, 2007, 05:52:07 PM »

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.
Logged

BeBot Founder and Fixer Kingpin
Madman coder and destroyer of good code
Pages: [1]   Go Up
Print
BeBot - An Anarchy Online/Age Of Conan chat automaton > Forum > Development > Coding and development discussion > Topic: 0.2 to 0.3/0.4 upgrade
« previous next »
 
Jump to:  

Recent
!items database
by Zeephonz
[Today at 08:05:21 PM]

Log playtime from buddys ...
by IKShadow
[Today at 06:48:12 AM]

[request] Raid timers
by Elesar1
[December 01, 2008, 04:41:09 PM]

Shared DB online list
by Temar
[December 01, 2008, 01:55:47 AM]

relay colors
by Temar
[December 01, 2008, 01:54:56 AM]

BeBot v0.6.0 released
by Alreadythere
[November 30, 2008, 05:32:00 PM]

Change to Bid.php
by Temar
[November 30, 2008, 11:41:44 AM]

OnlineOrg
by Jiheld
[November 29, 2008, 12:44:27 PM]

Silly Newbie Question.
by Temar
[November 29, 2008, 12:00:02 PM]

massive_pvp_time_table 1
by gerborg
[November 29, 2008, 06:55:35 AM]
Stats
Members
Total Members: 1244
Latest: Armonkens
Stats
Total Posts: 11146
Total Topics: 1505
Online Today: 25
Online Ever: 168
(July 01, 2007, 09:30:02 PM)
Users Online
Users: 2
Guests: 15
Total: 17
Elesar1
Vain

Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC
TinyPortal v0.9.8 © Bloc | NewDef design by Bloc
Page created in 0.44 seconds with 28 queries. (Pretty URLs adds 0.026s, 4q)
Loading...