Spami has quit [Quit: This computer has gone to sleep]
<waxjar>
the two dont have anything to do with each other CM-Punk
<CM-Punk>
Yes they do
<CM-Punk>
That loads the plugins
<CM-Punk>
The plugins need those configuration
<CM-Punk>
If I load it without it doesn't work
<CM-Punk>
If I put it in the config before starting, I get an unitialized constant exception
<waxjar>
I don't think I understand your question
<CM-Punk>
My question is, how to make the plugin load the configuration when it loads the target plugin
<waxjar>
its done automatically. you can access the configuration Hash trough config in the plugin itself.
<CM-Punk>
That sounds confusing...
<CM-Punk>
I think i get what you're saying
<waxjar>
are you sure you meant to link the documentation on events?
<CM-Punk>
Let me give you an example...
<CM-Punk>
So I can explain it better.
<CM-Punk>
I have a plugin called Greeting
<CM-Punk>
In my Eve.rb file, I have [16:22:34] <CM-Punk> For example: c.plugins.options[Cinch::Plugins::Greeting] = { enabled_channels: ["#Foo", "#Bar", "#Channel"] }
<CM-Punk>
This is without the PluginManagement plugin
<CM-Punk>
In the Greeting plugin it checks to make sure the channel is in the array
<CM-Punk>
Now if I put c.plugins.options[Cinch::Plugins::Greeting] = { enabled_channels: ["#Foo", "#Bar", "#Channel"] } and start up the bot without putting c.plugins.plugins = [Cinch::Plugins::Google] and pre-loading the greeting plugin anyway, it will throw an exception
<CM-Punk>
If I don't put c.plugins.options[Cinch::Plugins::Greeting] = { enabled_channels: ["#Foo", "#Bar", "#Channel"] } and I try to use the greeting plugin it throws a MethodError exception on "include?"
<CM-Punk>
[13:11:32] <waxjar> are you sure you meant to link the documentation on events? Waxjar
<CM-Punk>
Fuck
<waxjar>
i like to load my plugins like so: c.plugins.plugins << Cinch::Plugins::Whatever, so I don't mess with things that are already loaded.
<waxjar>
c.plugins.plugins = [Cinch::Plugins::Google] would only load the Google plugin, even if you did c.plugins.plugins = [Cinch::Plugins::Greeting] before
<CM-Punk>
The problem is the configuration array: c.plugins.options[Cinch::Plugins::Greeting] = { enabled_channels: ["#Foo", "#Bar", "#Channel"] }
<CM-Punk>
If I have that in the bot before starting it without loading the plugin, I get an exception. I don't want to load the plugin off the bat
<CM-Punk>
I want the PluginManagement to load it manually later
<CM-Punk>
BUT if I don't put in the options prior to load
<CM-Punk>
Greeting will not work because it has no array to look for enabled channels.
<waxjar>
okay
<waxjar>
so, your question is how to get it configured without configuring it beforehand?
<CM-Punk>
YES
<CM-Punk>
Thank you XDD
<CM-Punk>
I'm confusing sometimes.
<waxjar>
very much so :p
<CM-Punk>
I want the PluginManagement to be able to do it.
<CM-Punk>
I think too damn much, and I just spew out what's in my brain that makes sense to me, I'm working on it, I promise
<CM-Punk>
XD
<CM-Punk>
I see on Line...
<CM-Punk>
83
<CM-Punk>
There is a method for setting options
<CM-Punk>
But I'm not sure I'm doing it right
<waxjar>
seems to me that you've got to use that, yeah. i'm not familiar with that plugin though.
<CM-Punk>
See I wrote Greeting.rb but I didn't right the plugin management, dominikh did
<CM-Punk>
If I could find a way to re-write it, or make it so it works right, or find how to set the options properly, it would be a life saver
<waxjar>
you're using it like so: !load Greeting enabled channels ["#bla", "..."] ?
<waxjar>
eeh, !set it mean
<CM-Punk>
Well I do
<waxjar>
and enabled_channels
<CM-Punk>
~plugin load Greeting
<CM-Punk>
It loads it
<CM-Punk>
Then I do ~plugin set Greeting :enabled_channels #Eve
<CM-Punk>
Should I put the brackets in?
<CM-Punk>
Then I do ~plugin set Greeting enabled_channels #Eve
<CM-Punk>
Actually
<CM-Punk>
:P
<waxjar>
i think so, the third argument is eval'ed
<waxjar>
(eeew :p)
<CM-Punk>
Yeah, I mean I normally write my own plugins, but I just couldn't figure out how to do a load while the bot was running so I used this
<CM-Punk>
Let me give that a try
<CM-Punk>
Hold on
<CM-Punk>
That doesn't work either
<CM-Punk>
Waxjar
<CM-Punk>
I figured it out
<CM-Punk>
Thank you for your help
thews has quit [Ping timeout: 272 seconds]
<waxjar>
:)
thews has joined #cinch
_whitelogger has joined #cinch
Czupa has joined #cinch
Czupa has quit [Remote host closed the connection]
[krisbulman] is now known as krisbulman
waxjar is now known as shadesaaaa
krisbulman is now known as [krisbulman]
[krisbulman] is now known as krisbulman
<thews>
just about have my bot fully working, but I need to know the best way to periodically do something without halting everything else, I need to check like once a minute if any external data has come in to process
<thews>
is there already an elegant solution for that?