<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?
<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