djbkd has quit [Remote host closed the connection]
nickrw has quit [Ping timeout: 258 seconds]
nickrw_ has joined #cinch
ayonix_ has joined #cinch
ayonix has quit [Ping timeout: 258 seconds]
djbkd has joined #cinch
djbkd has quit [Ping timeout: 244 seconds]
nickrw_ is now known as nickrw
postmodern has quit [Quit: Leaving]
sarkyniin has joined #cinch
britneywright has joined #cinch
sarkyniin has quit [Ping timeout: 256 seconds]
jmaister has joined #cinch
<jmaister>
hi
<jmaister>
I want to implement a database in my bot, but I want to share it among the plugins and persist it in the bot. Is ther anyway to store it so that I can call bot.db.metod?
<catepillar>
you can used the shared method
<catepillar>
i will explain more in a bit, got a meeting
<catepillar>
quick enough meeting
<catepillar>
the configure block has a parameter called "shared"
<catepillar>
it's a hash
<catepillar>
and you can add anything you want to that
<catepillar>
then in your plugin you can use shared[:key] to get it
<catepillar>
c.shared = {:db=>db}
<catepillar>
for the configure
<catepillar>
and then in the plugins you would call `shared[:db]`
<jmaister>
ah, that's great
<jmaister>
thanks
<catepillar>
i don't see any basic examples
<catepillar>
i have a rather (overly) complicated bot
<catepillar>
that makes use of it a little
<jmaister>
that worked
<jmaister>
c.shared = {:db => Db::new()} in the creation of the bot
<jmaister>
then db = shared[:db] in my plugin
<jmaister>
thanks :)
<jmaister>
I'm making a simple database handler for my plugins to read and write values
<catepillar>
that's what shared is there for
<jmaister>
Well, the docs weren't very clear on that point
<jmaister>
Be back later
Crazy_Atheist has quit [Quit: WeeChat 1.0.1]
djbkd has joined #cinch
ayonix_ has quit [Remote host closed the connection]
ayonix has joined #cinch
djbkd has quit [Ping timeout: 250 seconds]
ccallahan has quit [Ping timeout: 245 seconds]
ccallahan has joined #cinch
djbkd has joined #cinch
djbkd has quit [Ping timeout: 255 seconds]
ayonix has quit [Remote host closed the connection]
Crazy_Atheist has joined #cinch
Crazy_Atheist has joined #cinch
Crazy_Atheist has quit [Changing host]
Crazy_Atheist has quit [Read error: Connection reset by peer]
Crazy_Atheist has joined #cinch
Crazy_Atheist has quit [Read error: Connection reset by peer]
Crazy_Atheist has joined #cinch
IotaSpencer has joined #cinch
ayonix has joined #cinch
djbkd has joined #cinch
djbkd has quit [Remote host closed the connection]
djbkd has joined #cinch
sarkyniin has joined #cinch
IotaSpencer has quit [Quit: WeeChat 1.0.1]
Crazy_Atheist has quit [Quit: No bacon on this network right now...]
djbkd has quit [Remote host closed the connection]
djbkd has joined #cinch
djbkd has quit [Remote host closed the connection]
djbkd has joined #cinch
djbkd has quit [Remote host closed the connection]
britneywright has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
djbkd has joined #cinch
britneyw_ has joined #cinch
djbkd has quit [Remote host closed the connection]
djbkd has joined #cinch
apt-get_ has joined #cinch
sarkyniin has quit [Ping timeout: 250 seconds]
apt-get_ has quit [Remote host closed the connection]
<waxjar>
Enumerable#find returns nil if the block returns false for every entry
<dominikh>
that looks like a Ruby question to me, not a Cinch question.
<waxjar>
^
<shazaum>
just plugin for cinch
<dominikh>
it's still a generic Ruby question and has nothing to do with Cinch ;)
<shazaum>
yes, just asked here... maybe not realized, and also did not know you did not like it
britneyw_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
djbkd has quit [Remote host closed the connection]
<mpapis>
shazaum, maintaining a project requires time, those who still have mroe time hang in #ruby-lang to help answer generic questions
postmodern has joined #cinch
<shazaum>
mpapis, sorry for the generic question
djbkd has joined #cinch
<mpapis>
shazaum, don't be you had question and got directions where to get answers, don't be afraid to ask questions - it's how almost everybody learns
djbkd has quit [Remote host closed the connection]
djbkd has joined #cinch
djbkd has quit [Remote host closed the connection]
djbkd has joined #cinch
djbkd has quit [Remote host closed the connection]
britneywright has joined #cinch
britneywright has quit [Client Quit]
djbkd has joined #cinch
djbkd has quit [Remote host closed the connection]
shazaum has quit [Quit: This computer has gone to sleep]
Crazy_Atheist has joined #cinch
djbkd has joined #cinch
djbkd has quit [Remote host closed the connection]
Azure has quit [Ping timeout: 244 seconds]
Azure has joined #cinch
liru has joined #cinch
djbkd has joined #cinch
djbkd has quit [Remote host closed the connection]
djbkd has joined #cinch
djbkd has quit [Remote host closed the connection]
djbkd has joined #cinch
djbkd has quit [Remote host closed the connection]