dominikh changed the topic of #cinch to: The IRC Framework | Latest version: Cinch 2.2.6
postmodern has quit [Quit: Leaving]
postmodern has joined #cinch
Rickmasta has joined #cinch
<Rickmasta> Hey guys, would someone mind guiding me on how to "listen" to a specific user
<Rickmasta> for example, when it is that persons go in a game, and you want to listen for their response.
<Rickmasta> I've tried figuring it out, but can't seem to.
_djbkd has quit [Quit: My people need me...]
waxjar has quit [Ping timeout: 246 seconds]
waxjar has joined #cinch
<leftylink> Rickmasta: it seems like the thing to do is just to listen to messages from any user, then just check whether it's the user you are expecting. if it isn't the user you care about, do nothing
<Rickmasta> So that's what I was doing
<Rickmasta> when it was their turn I set a "listeninguser" variable
<Rickmasta> but the issue I ran into was
<Rickmasta> how do I get it to wait around until the user says something?
<leftylink> Rickmasta: ah interesting. but isn't waiting around until the user says something the default behavior of cinch? for example if in a plugin I write "match 'hello'" then it's going to wait around until someone says '!hello', that's what you want, right?
<Rickmasta> yeah
<Rickmasta> but I'm not sure how to do it in the middle of a method
<Rickmasta> for example I have a method turn() and turn asks them to perform an action
<Rickmasta> I want to be able to capture what is said from inside method
Rennex has quit [Ping timeout: 256 seconds]
Rennex has joined #cinch
<leftylink> Rickmasta: hmm, but it doesn't seem necessary for it to be in the middle of a method. because when you specify that a matcher should call a method, it's gotta start at the start of whatever method you told it to call...
<leftylink> Rickmasta: Iif I think abou tit, I could see a possibility to have turn() be running in a thread, it blocks on reading a pipe created via http://ruby-doc.org/core-2.1.0/IO.html#method-c-pipe , and then the message handler puts something into the pipe, but it seems a bit unnecessary. but i dont know, that's just me
<leftylink> the IO.pipe solution *could* work, but seems a bit "unnatural"
<leftylink> basically
<leftylink> that's what I think anyway
<Rickmasta> Gess I should have mentioned that I'm a novice programmer.
<Rickmasta> I have no idea what and IO.pipe is.
<leftylink> ah, then I guess it was a good idea for me to have linked to the docs on it then
<leftylink> ok yeah that explained it much better than I could have possibly hoped to explain it, phew
_djbkd has joined #cinch
<leftylink> Rickmasta: so I think the logical conclusion of the "it's gotta start at the start of whatever method you told it to call..." to me is that turn() should actually be broken into two methods. the first part should ask the user what to do, that's it, it does nothing else. then when the user says what to do, that should cause the second method to get called
<Rickmasta> yup
<Rickmasta> thats what I'm doing
<Rickmasta> now just trying to figure out how to keep track of the user's choices
Rickmast_ has joined #cinch
Rickmasta has quit [Ping timeout: 268 seconds]
postmodern has quit [Quit: Leaving]
Rickmasta has joined #cinch
Rickmast_ has quit [Ping timeout: 240 seconds]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
_djbkd has quit [Remote host closed the connection]
Rickmasta has joined #cinch
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sarkyniin has joined #cinch
sarkyniin has quit [Remote host closed the connection]
sarkyniin has joined #cinch
sarkyniin has quit [Remote host closed the connection]
sarkyniin has joined #cinch
Rickmasta has joined #cinch
sarkyniin has quit [Ping timeout: 240 seconds]
sarkyniin has joined #cinch
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sarkyniin has quit [Ping timeout: 240 seconds]
sarkyniin has joined #cinch
sarkyniin has quit [Ping timeout: 265 seconds]
sarkyniin has joined #cinch
sarkyniin has quit [Ping timeout: 240 seconds]
sarkyniin has joined #cinch
postmodern has joined #cinch
_djbkd has joined #cinch
apt-get_ has joined #cinch
sarkyniin has quit [Ping timeout: 265 seconds]
_djbkd is now known as djbkd_
djbkd_ is now known as djbkd
djbkd has quit [Remote host closed the connection]
djbkd has joined #cinch
djbkd has quit [Read error: Connection reset by peer]
djbkd has joined #cinch
djbkd has quit [Remote host closed the connection]
apt-get_ is now known as sarkyniin
djbkd has joined #cinch
djbkd has quit [Read error: Connection reset by peer]
djbkd has joined #cinch
Zackio has quit [Ping timeout: 244 seconds]
sarkyniin has quit [Ping timeout: 252 seconds]
Zackio has joined #cinch
sarkyniin has joined #cinch
djbkd has quit [Ping timeout: 260 seconds]
djbkd has joined #cinch
sarkyniin has quit [Read error: No route to host]
sarkyniin has joined #cinch
sarkyniin has quit [Ping timeout: 240 seconds]