dominikh changed the topic of #cinch to: The IRC Framework | Latest version: Cinch 2.1.0
cyrusdav- has joined #cinch
cyrusdavid has quit [Ping timeout: 240 seconds]
Spami has quit [Quit: This computer has gone to sleep]
kludge` has quit [Ping timeout: 276 seconds]
kludge` has joined #cinch
kludge` has quit [Changing host]
kludge` has joined #cinch
postmodern has quit [Quit: Leaving]
FiXato has quit [Remote host closed the connection]
FiXato has joined #cinch
Lumio has joined #cinch
<Lumio> hey everyone…. is there a way to create a plugin with more than one reaction/match?
<dominikh> check out /examples/plugins/multiple_matches.rb
<Lumio> ok thx :)
Lumio has quit [Quit: Lumio]
Lumio has joined #cinch
<Lumio> anyone knows how to properly debug ruby?
Lumio is now known as eden42
eden42 is now known as Lumio
Lumio has quit [Quit: Lumio]
Lumio has joined #cinch
Spami has joined #cinch
Spami has quit [Quit: This computer has gone to sleep]
Lumio is now known as butterbrei
butterbrei is now known as Lumio
<Lumio> hm, how can i directly send a message… for example:
<Lumio> bot.send to: “Lumio”, “message"
<dominikh> bot.User("foo").send("bar")
<dominikh> in the context of plugins you can just say User("foo"), no need for bot.
<Lumio> what is User(“foo”) in the context of plugins? A method? A class?
<Lumio> but thx dominikh
<dominikh> Lumio: it's this: http://rubydoc.info/gems/cinch/Cinch/Helpers#User-instance_method – and the Helpers module gets mixed into plugin instances. and into Bot as well, which is why bot.User works
<Lumio> ok .. one more question… can I somehow make a subthread or something so I can send a message to a user and wait until he responds and continue only then with a certain task?
<dominikh> I'll respond to that after I've eaten
<Lumio> bon apetit
<dominikh> thanks. Lumio: first of all: no, there's no straightforward way to, in a method, wait for a message before continuing. what you'd do is split the task into multiple steps, and have a handler/matcher that triggers the next step
<dominikh> and you'd carry around state for the specific user
<Lumio> ok - so old-fashion, more or less
<Lumio> thanks dominikh
<Lumio> :)
<dominikh> "stupid callback style", yeah
* dominikh adds a note to consider that feature in his other IRC library
<dominikh> that approach is less error-prone though, if the user manages to respond before you wait for the response
<dominikh> as in, you won't miss a message
<Lumio> mhm that’s true
<dominikh> sort of, anyway. you will still do if the state isn't as expected
<dominikh> but that's up to you ;)
postmodern has joined #cinch