Openkore data + MySQL

Wrote new code? Fixed a bug? Want to discuss technical stuff? Feel free to post it here.

Moderator: Moderators

Bibian
Perl Monk
Perl Monk
Posts: 416
Joined: 04 Apr 2008, 03:08

Openkore data + MySQL

#1 Post by Bibian »

Would it be possible (and usefull) to have openkore support having data from control/*.txt and tables/*.txt in a mysql database?

This way you could have 1 single database server to which your clients connect and get their data from, all they would need to do is query the right data.
1 database would be able to house the information for an unlimited amount of bots (limited by your HD space of course), making it easier to manage (with a proper tool).

Thoughts? Idea's?

ps: Dont reply if you dont know what MySQL is, does or howto use it
Cozzie
Spam Generator
Spam Generator
Posts: 499
Joined: 04 Apr 2008, 09:30
Noob?: No
Location: Melbourne, City of beer and awful sushis

Re: Openkore data + MySQL

#2 Post by Cozzie »

I'm trying to think up of a good example and cant think of anything, care to share where your idea comes from?
Make Openkore Awesome. Join the team.
sli
Perl Monk
Perl Monk
Posts: 810
Joined: 04 Apr 2008, 17:26
Noob?: No

Re: Openkore data + MySQL

#3 Post by sli »

Possible, yes. Useful, yes. Feasible or practical? Fuuuuck no. Needed? Still fuck no. Consider: who's going to have issues running out of room for OpenKore installations (which is just, minimum, one config file per bot and nothing more) but own a hosting account with a high amount of available SQL space? A lot of hosts don't even allow external connections to MySQL.
cs : ee : realist
Bibian
Perl Monk
Perl Monk
Posts: 416
Joined: 04 Apr 2008, 03:08

Re: Openkore data + MySQL

#4 Post by Bibian »

well this way i could (for example) run a bot at home and at my server without having to transfer the config
sli
Perl Monk
Perl Monk
Posts: 810
Joined: 04 Apr 2008, 17:26
Noob?: No

Re: Openkore data + MySQL

#5 Post by sli »

Honestly, it'd be much easier over HTTP(S) or just HTTP with basic auth. You could do it with a plugin. Just have it hook start, then download and overwrite the config before it's loaded.
cs : ee : realist
Cozzie
Spam Generator
Spam Generator
Posts: 499
Joined: 04 Apr 2008, 09:30
Noob?: No
Location: Melbourne, City of beer and awful sushis

Re: Openkore data + MySQL

#6 Post by Cozzie »

I was thinking along the lines of easier/powerful ways of sharing/manging config files, but regarding vivi's use of this, I remember she suggested it months ago and it's a good idea imo. It's just really for the real power users.
Make Openkore Awesome. Join the team.
Kissa2k
Human
Human
Posts: 46
Joined: 27 Apr 2008, 12:52
Noob?: No
Location: Russia

Re: Openkore data + MySQL

#7 Post by Kissa2k »

It's hard enough to code it. I think transferring config files through http to your server will be much easier..
sli
Perl Monk
Perl Monk
Posts: 810
Joined: 04 Apr 2008, 17:26
Noob?: No

Re: Openkore data + MySQL

#8 Post by sli »

Well, with MySQL I imagine it'd just be one query to get an entire config and the resulting data is parsed just like the current config:

Code: Select all

select config from control where char='Flipkick'
Or one query to get a MySQL version of the config:

Code: Select all

select * from config where char='Flipkick'
Then the row is fetched as an associative array into %config where it could be accessed exactly like it is currently ($config{master} would be the 'master' field in the config table).
cs : ee : realist
Silence
Human
Human
Posts: 26
Joined: 17 Aug 2008, 01:20
Noob?: No

Re: Openkore data + MySQL

#9 Post by Silence »

its a good idea but then you will have to deal with people trying to setup their own MySQL server and then dealing with configuring and updating it.

It would be a good idea for an off branch of OK for people who bot via different locations but i don't see whats wrong with using a program such as DKore http://rofan.ru/viewtopic.php?t=2479 (which -SHOULD- be a main part of OpenKore anyways) for running multiple accounts.
sli
Perl Monk
Perl Monk
Posts: 810
Joined: 04 Apr 2008, 17:26
Noob?: No

Re: Openkore data + MySQL

#10 Post by sli »

Everything in OpenKore is obvious, people just don't want to figure shit out themselves. There's no need for a specialized config editor.
cs : ee : realist