dominikh changed the topic of #cinch to: The IRC Framework | Latest version: Cinch 2.0.5
v0n has quit [Ping timeout: 256 seconds]
Spami has quit [Quit: This computer has gone to sleep]
Guest77126 is now known as Spaceghost
Spaceghost has quit [Changing host]
Spaceghost has joined #cinch
rikai_ has quit [Read error: Connection reset by peer]
jonahR has joined #cinch
d4rkr4i has joined #cinch
rikai has joined #cinch
jonahR has quit [Quit: jonahR]
space has joined #cinch
space is now known as Guest28238
Spaceghost has quit [Ping timeout: 246 seconds]
postmodern has quit [Quit: Leaving]
Spami has joined #cinch
Spami has joined #cinch
Spami has quit [Quit: This computer has gone to sleep]
Spami has joined #cinch
Spami has joined #cinch
Guest28238 has quit [Ping timeout: 276 seconds]
Spaceghost has joined #cinch
Spaceghost is now known as Guest72689
Guest72689 is now known as Spaceghost
Spaceghost has quit [Changing host]
Spaceghost has joined #cinch
Spami has quit [Quit: This computer has gone to sleep]
Spami has joined #cinch
Spaceghost has quit [Ping timeout: 268 seconds]
Spaceghost has joined #cinch
Spaceghost is now known as Guest27621
Guest27621 is now known as Spaceghost
Spaceghost has quit [Changing host]
Spaceghost has joined #cinch
gwillickers has joined #cinch
rikai has quit [Remote host closed the connection]
rikai has joined #cinch
gwillickers has left #cinch [#cinch]
jonahR has joined #cinch
jonahR has quit [Client Quit]
jonahR has joined #cinch
v0n has joined #cinch
postmodern has joined #cinch
v0n has quit [Ping timeout: 276 seconds]
<nickrw> before I embark on a project, please save my sanity - is it going to be relatively simple to redefine matches at runtime? Context: I'm putting i18n into my bot, and I'd like to be able to change the matchers against the selected language
<dominikh> nickrw: it's easy to *create* and *remove* matchers at runtime. I'll have to check if changing them is possible. but in all cases you'd be dealing with the low-level objects, on-handlers, not really matchers
<dominikh> well, instances of Handler specificall
anoe has left #cinch [#cinch]
<nickrw> depends how easy it is to locate the appropriate Handler I suppose
<dominikh> and no, you cannot change handlers at runtime
<dominikh> only add and remove
<dominikh> nickrw: I'm curious why you want to change them, instead of just using the right ones at startup
<nickrw> because I have a command which changes the language on demand
<dominikh> you'd be facing a lot of pain in that case
<nickrw> it just changes the locale it passes to the I18n.translate command
<dominikh> also, is that local to channels or global to the bot?
space has joined #cinch
<nickrw> the bot is only designed to sit in one channel at the moment
space is now known as Guest23248
Spaceghost has quit [Ping timeout: 252 seconds]
<dominikh> you could find the correct instances of Matcher in the plugin classes, change them, unload the plugin and reload the plugin
<dominikh> but actually knowing which matchers to change is again cumbersome
<waxjar> you could construct a plugin class on the fly maybe, mix in a generic module with all the methods, mix in a module that holds the actual calls to match (in the right language)
d4rkr4i has quit [Quit: Leaving.]
<waxjar> nvm, stupid idea, that wouldn't help with the output at all
<nickrw> output?
<waxjar> the messages you send, i assume you'd want them in the right language as well
<nickrw> ah, I've already done that part
<nickrw> that's the easy bit :P
<nickrw> hm
Guest23248 is now known as Spaceghost
Spaceghost has quit [Changing host]
Spaceghost has joined #cinch
<nickrw> ah, it can be quite easy to identify which Handlers to unregister if I register them all with a group
<dominikh> hm, I suppose
<nickrw> I've got it half working by doing self.class.match(blah) ; __register_matchers
<nickrw> but unregistering is problematic because I don't think I can write to @matchers
<nickrw> so if I switch languages the new command is registered, but then the old one gets registered again
<dominikh> why don't you modify the existing matchers
<nickrw> you said I'd have to unload/load the plugin after that, and I don't want to cancel timers
<nickrw> also identifying the matchers seems a difficult, unless I'm missing something
<dominikh> ah
<dominikh> well, all ways of "solving" this will be rather painful…
Spaceghost has quit [Remote host closed the connection]
Spaceghost has joined #cinch
Spaceghost is now known as Guest1712
Guest1712 is now known as Space
Space has quit [Changing host]
Space has joined #cinch
Spami has quit [Quit: This computer has gone to sleep]