dominikh changed the topic of #cinch to: The IRC Framework | Latest version: Cinch 2.0.5
[Rickmasta] has joined #cinch
rickmasta has quit [Ping timeout: 264 seconds]
<dominikh>
bye.
v0n has joined #cinch
Guest43797 has quit [Remote host closed the connection]
17WAB1AYF has joined #cinch
[Rickmasta] has quit [Quit: Leaving...]
rikai has quit [Read error: Connection reset by peer]
rikai has joined #cinch
rickmasta has joined #cinch
centracore_ has quit [Quit: leaving]
sacc91_ has joined #cinch
adrian1 has joined #cinch
Spaceghost has joined #cinch
Spaceghost is now known as Guest79454
17WAB1AYF has quit [*.net *.split]
ayonix has quit [*.net *.split]
sacc91 has quit [*.net *.split]
sacc91_ is now known as sacc91
jonahR has joined #cinch
rickmasta has quit [Quit: Leaving...]
jonahR has quit [Quit: jonahR]
jonahR has joined #cinch
v0n has quit [Ping timeout: 264 seconds]
jonahR has quit [Quit: jonahR]
Spaceghost has joined #cinch
Spaceghost is now known as Guest86239
Guest79454 has quit [Ping timeout: 248 seconds]
postmodern has quit [Quit: Leaving]
Guest86239 is now known as Spaceghost
Spaceghost has quit [Changing host]
Spaceghost has joined #cinch
jonahR has joined #cinch
jonahR has quit [Client Quit]
jonahR has joined #cinch
v0n has joined #cinch
rickmasta has joined #cinch
jonahR has quit [Ping timeout: 256 seconds]
jonahR has joined #cinch
<nickrw>
ok, so I don't understand how this works
<nickrw>
I'm defining my matchers with self.class.match(Regexp, :options) in my initialize method, after calling super
<nickrw>
then calling __register_matchers
<nickrw>
works fine when the plugin starts for the first time, but if I unload (bot.plugins.unload_plugin(x)) and load again, my matchers get defined twice
<nickrw>
sorry, three times, not twice
<nickrw>
once when the original matcher
<nickrw>
added it, second and third because I have added it to the list again, and called __register_matchers to add it twice more
<nickrw>
but I was under the impression that unloading the plugin would wipe the state of matchers in the first place
<nickrw>
oh, they're being stored as class variables
<nickrw>
ok, so I've had some success by adding a custom method to Cinch::Plugins::ClassMethods which resets @matchers, and calling that before super
<nickrw>
dominikh: would you accept a patch for that, or would you prefer just changing @matchers to attr_accessor (currently attr_reader)?
<dominikh>
give me a minute to read the backlog :)
<dominikh>
nickrw: you could also just cheat and use Array#clear
<nickrw>
oh
<nickrw>
haha
rickmasta has quit [Quit: Leaving...]
<dominikh>
and right now I'd prefer that over having to extend the API :)
<nickrw>
yeah
<nickrw>
this is pretty edge case anywya
<dominikh>
I've never considered plugins that mutate themself
<dominikh>
well, nor each other.
<nickrw>
after I've mangled this, my next sanity-draining bodge will be to try and get the plugins reloading their code off disk
<nickrw>
I vaguely recall seeing someone having a poke at that a long time ago