<Donovan>
I may have answered my own quandary while typing that out
<dominikh>
plugins have names, why do I need to explicitly create the container?
v0n is now known as v1n
v1n is now known as v0n
<Donovan>
right now, the Storage.register() creates a database table, so you have to register it first. That's the part I'd like to hook in so we build it from the plugin name
<Donovan>
well, meaning, it creates or retrieves
<Donovan>
I'm still toying with it, though you might like to help me tease it out. =)
<Donovan>
not the code, per se, by offering suggestions and what-not
<dominikh>
I'll look in a minute, busy right now
<waxjar>
Donovan, have you come up with a fail-proof way of linking users to stored data that takes into account host-changes and whatnot?
<Donovan>
dominikh: no worries
<dominikh>
waxjar: use their account name with nickserv etc, fuck people who aren't registered
<waxjar>
heh
<Donovan>
waxjar: well, right now it's just a simple database backed for a plugin storage engine
<Donovan>
but yes, in the configuration the programmer can set the database type, user, and password
<Donovan>
but that hasn't been fully tested. It's built on top of the Sequel gem
<Donovan>
so, the database back-end is fully tested (i.e. Sequel itself)
<waxjar>
i see
<Donovan>
I'm really just building middleware between cinch and sequel, and giving it a key => value syntax
<Donovan>
so, the memo plugin could register as 'memos = Storage.register(:memos)'... which would create or retrieve the 'memos' table from the database and provide a class which now supports
<Donovan>
memos[:somekey] = 'some value'
<Donovan>
and stores that value in the database keyed to 'somekey'
<Donovan>
really, I'm just creating three columns in each table... an id, a 'key' column, and a 'value' column
<Donovan>
so each row in the database would be a distinct "key" and "value"
<Donovan>
it's working well, so far.
<Donovan>
and since Sequle is already thread safe, it should be pretty robust
<Donovan>
*sequel
<Donovan>
dominikh: is Cinch::Configuration the best namespace to put my extension configuration? Or should I be using something like Cinch::Extensions::Configuration to avoid pollution?
<dominikh>
uh, I have no idea
<Donovan>
or even Cinch::Extensions::Plugin::Configuration
<Donovan>
okay, wasn't sure if cinch made any assumptions
<dominikh>
well that last thing just looks stupid
<Donovan>
yeah, agreed
<dominikh>
I guess Cinch::Configuration makes sense.
<Donovan>
although, I meant 'plugin-name' not, literal 'Plugin'
<dominikh>
I'll be honest: I have so many things on my mind right now, there's really no space for Cinch
<Donovan>
okay... that's where I started, but I had to rename my configuration module because there's already a Configuration::Storage in the Cinch code
<Donovan>
dominikh: okay, fair enough then. I'll check back with you later.
<dominikh>
that doesn't mean just today, I generally have plenty of projects and other things going on; I don't remember most of Cinch's architecture
<Donovan>
don't we all.
<Donovan>
well, shit, I don't know what you're saying then. You don't want to be bothered with it, or you just don't remember the details so cannot say?
<dominikh>
well, mostly the latter
<dominikh>
I didn't even remember we had a Cinch::Configuration
<Donovan>
okay
<Donovan>
would you prefer if we took over support of cinch (we being myself and waxjar or whomever else wants to help)?
<dominikh>
if anything send a PR that removes the existing Storage stuff from Cinch core
<Donovan>
I can do that as well
<dominikh>
it should have never been in any released version in the first place
Space has quit [Read error: Connection reset by peer]