ChanServ changed the topic of #cinch to: The IRC Framework | http://groups.google.com/group/cinch-ruby/ | Latest version: Cinch 2.0.4 – Change log at http://bit.ly/14Q4s6Z – Migration guide at http://bit.ly/GO4qkW | This channel is being publicly logged at http://irclog.whitequark.org/cinch/
kith_ is now known as kith
bean has quit [Quit: Computer has gone to sleep.]
Lemtzas is now known as ZombieMoses
ZombieMoses is now known as Lemtzas
Lemtzas is now known as ZombieMoses
ZombieMoses is now known as Lemtzas
<maetthew> Can I restart a Cinch bot from "within itself"?
<catepillar> It's possible to reload plugins, if you are using those and have the plugin-manager included
postmodern has joined #cinch
v0n has joined #cinch
<maetthew> catepillar: yeah i know i can reload plugins. but restart the entire bot? or will i have to invoke shell?
<catepillar> this is a little over my head
<catepillar> but you might be able to do a @bot.stop
<catepillar> and then have a loop running and starting the bot
<catepillar> if it isn't started
<maetthew> hmm ok
<maetthew> thanks
flexd has quit [Ping timeout: 244 seconds]
<fridim> maetthew: catepillar : we wrote a "plugin reloader" with v0n
<maetthew> fridim: link?
<fridim> as far as we know, it works perfectly :)
<catepillar> that's kinda what I was imagining. good to see someone out there already implemented it
<fridim> KISS :)
<fridim> you can add a plugin manager (for controlling from the channel)
<fridim> but the mechanics is in the first link
<catepillar> the link I posted earlier is a more complete way to reload plugins
<catepillar> it actually reinitializes everything
<catepillar> clears old data, etc
<fridim> we just do a unregister_all
<catepillar> fridim: yours isn't guaranteed to do that.
<fridim> remove the matches and listeners
<fridim> the pluginManagement from mathetes is a bit overkill I think
<fridim> (for our needs)
<catepillar> maybe
<fridim> and as I said, AFAWK it works ! :)
<catepillar> lol
<catepillar> fair enough
<fridim> actually it's a must have when you dev a bot
<fridim> change your code, reload, test, change your code, ...
<fridim> :)
v0n has quit [Ping timeout: 252 seconds]
<maetthew> fridim: cool thanks alot
<plagueweezle> aye! yay for bot plugin reload goodness!
<fridim> :'D
* plagueweezle sighs at homebrew rrdtool.
v0n has joined #cinch
flexd has joined #cinch
V8Energy has quit [Ping timeout: 252 seconds]
jhaals has joined #cinch
jhaals has quit []
sjk has left #cinch [#cinch]
jhaals has joined #cinch
jhaals has quit []
v0n has quit [Ping timeout: 256 seconds]
<Rennex> bah, plugin reloaders... i did that once in the distant past... afterwards i realised that an irc bouncer is a much simpler solution, and more robust because you can just restart the whole bot without losing the connection :)
<Rennex> ok, there's a chance to lose an incoming message just at the point of killing the bot, that i haven't really addressed... but it's no biggie, and the bouncer should replay any messages from when the bot was offline
<waxjar> yeah, i like that solution a lot.
postmodern has quit [Quit: Leaving]
V8Energy has joined #cinch
<V8Energy> plagueweezle: how do you reload your plugin? the way I do it is I put the plugin in a seperate file from the bot and i simply execute load bot_plugin.rb when the user writes !reload
<V8Energy> is there a better way to do it?
<dominikh> V8Energy: your approach is broken. that'll register new handlers every time you load it, without removing the old ones.
<V8Energy> so then what's the right way?
<V8Energy> @bot.reload_plugins should do the trick?
<V8Energy> fridim: a little help :D
<fridim> hi
<fridim> you can do that, just unregister the plugin, and load the .rb
<fridim> It's working here, but catepillar says it can be broken ... see https://github.com/dominikh/Mathetes/blob/cinch_rewrite/lib/cinch/plugins/plugin_management.rb
<fridim> it unsets some variables
<catepillar> i am, by no means, an expert on this
<catepillar> i just saw the link you posted, and understood that registers where being unhandled, and classes were being reinitialized, and that made sense to me
<fridim> yep, matchers/listeners are unregistered
<fridim> class are not really reloaded, but overwritter as it is possible with ruby
<fridim> if you delete a plugin, the class will still be in memory, but unused
<catepillar> right
<plagueweezle> V8Energy: I'm not that far yet. I'm planning to try out https://github.com/dominikh/Mathetes/blob/cinch_rewrite/lib/cinch/plugins/plugin_management.rb
v0n has joined #cinch
v0n has quit [Ping timeout: 244 seconds]
txdv has quit [Read error: Connection reset by peer]
txdv has joined #cinch
v0n has joined #cinch
v0n has quit [Ping timeout: 252 seconds]
v0n has joined #cinch