dominikh changed the topic of #cinch to: The IRC Framework | Latest version: Cinch 2.2.4
djbkd has quit [Remote host closed the connection]
FiXato has quit [Quit: Quit my IRC client. I'll probably be back soon after a restart of it.]
FiXato has joined #cinch
FiXato has quit [Client Quit]
FiXato has joined #cinch
djbkd has joined #cinch
djbkd has quit [Quit: My people need me...]
blindsight has quit [Ping timeout: 265 seconds]
blindsight has joined #cinch
blindsight is now known as Guest48533
cats has quit [Read error: Connection reset by peer]
postmodern has quit [Remote host closed the connection]
britneywright has joined #cinch
sarkyniin has joined #cinch
Guest48533 has quit [Changing host]
Guest48533 has joined #cinch
sarkyniin has quit [Ping timeout: 250 seconds]
<Wobbley> Hmm, what is the syntax to fire off a method on a matching regex message?
<Wobbley> I saw in the documentation that you can use do/end, but is there a way just to call a method instead?
<Wobbley> Because this is definately wrong: on :message, 'www.twitch\.tv/([^\s]+)', :method => :get_url_details :(
<leftylink> Wobbley: that'd be `match` instead of `on` (also pass a regex instead of a string like you currently have)
<Wobbley> leftylink: How would the syntax look? on :match, /www.twitch\.tv/([^\s]+)/, :method => :get_url_details
<leftylink> Wobbley: no `on` at all. the method is named `match`. examples dir should have something for you?
<Wobbley> leftylink: I saw someone else use "listen_to :channel" and "def listen(m)", that seems to work as well. My problem now is that for some reason the regex returns the entire string T_T
<Wobbley> leftylink: cause I just have to learn2Ruby more :p
<leftylink> Wobbley: hmm interesting. but I thought listen_to :channel would just fire on all channel messages. I don't know if it took a regex argument (if it does then ok we can carry on... but I notice the listen method was only taking one arg too, so...???
<Wobbley> leftylink: ouch you are absolutley right, it fires on everything
<Wobbley> but if it finds no match i can just return
<Wobbley> anyways brb in 10
postmodern has joined #cinch
<Wobbley> Well I found my problem leftylink : I needed to use scan, not match. Thanks for the help :)
<Wobbley> How would you only make the method trigger on a specific message though?
sarkyniin has joined #cinch
waxjar has quit [Ping timeout: 256 seconds]
<leftylink> Wobbley: ah makes sense. I remember scan vs match at some point in the past. I really think https://github.com/cinchrb/cinch/blob/master/examples/plugins/multiple_matches.rb is what you are looking for in only triggering on a specific message
<Wobbley> leftylink: Thats the thing though
<Wobbley> I don't want it to match commands?
<leftylink> I think I don't know what a command is
<Wobbley> Like !cake
<leftylink> hmm, but you wouldn't have to put "cake" in your match regex (or string). you could put whatever you want
<Wobbley> I am not sure if we are talking past each other here, or I am just misunderstanding perhaps
<leftylink> well I won't begrudge being corrected because I've had to correct some misunderstandings before
<leftylink> coworker asks me to review code, I leave comments, coworker responds in a way that didn't address what I meant, we go back and forth for about two comments before I just go "I think we are misunderstanding here" and we got ourselves on the same page again
<leftylink> no fear!
<leftylink> also needed to have no fear because coworker could be considered to be in a superior position compared to me. can't do it if I am afraid of retribution
<leftylink> although I guess in that case I had the advantage of being able to walk up to coworker and go "YO we are messed up" and I suppose we lack that option here
<leftylink> but we do the best we can, I hope
britneywright has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
apt-get_ has joined #cinch
sarkyniin has quit [Ping timeout: 256 seconds]
djbkd has joined #cinch
apt-get__ has joined #cinch
apt-get_ has quit [Ping timeout: 246 seconds]
britneywright has joined #cinch
djbkd has quit [Remote host closed the connection]
djbkd has joined #cinch
waxjar has joined #cinch
apt-get__ has quit [Ping timeout: 244 seconds]
apt-get__ has joined #cinch
apt-get__ has quit [Ping timeout: 250 seconds]