dominikh changed the topic of #cinch to: The IRC Framework | Latest version: Cinch 2.2.5
djbkd has quit [Remote host closed the connection]
djbkd has joined #cinch
djbkd has quit [Remote host closed the connection]
djbkd has joined #cinch
djbkd has quit [Remote host closed the connection]
djbkd has joined #cinch
djbkd has quit [Quit: My people need me...]
djbkd has joined #cinch
djbkd has quit [Quit: My people need me...]
Dwarf has quit [Ping timeout: 265 seconds]
Dwarf has joined #cinch
thews has quit [Read error: Connection reset by peer]
thews_ has joined #cinch
rikai has quit [Ping timeout: 264 seconds]
postmodern has quit [Quit: Leaving]
sarkyniin has joined #cinch
britneywright has joined #cinch
britneywright has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
britneywright has joined #cinch
apt-get_ has joined #cinch
sarkyniin has quit [Ping timeout: 255 seconds]
apt-get_ has quit [Ping timeout: 256 seconds]
apt-get_ has joined #cinch
Zackio has quit [Remote host closed the connection]
Zackio has joined #cinch
eebs has joined #cinch
<eebs>
Hi, I have a plugin that has a number of matches, and a listen_to :channel with a specific method set. Is there any way to determine if one of the matches were already triggered from inside the listen_to method?
<eebs>
i.e., don't run the listen_to if one of the matches already ran?
<dominikh>
not with a listen_to, no. matches can be put in groups, where only the first matching one in that group will execute
<dominikh>
of course a listener can be turned into a match with an empty pattern and no prefix/suffix set
<eebs>
oh okay. so I could change the listener to an empty pattern match and put them all in the same group, with the empty pattern match last
<dominikh>
so something like http://sprunge.us/IPbX (completely untested for typos etc) should work, assuming that foo and bar are also exclusive
<dominikh>
right
<eebs>
cool, thanks!
djbkd has joined #cinch
<eebs>
does react_on: :action only match on actions, or would that matcher also match if it weren't an action
<dominikh>
only actions
<eebs>
okay. so I should create two matchers that specify the same method, one with react_on: :action in order to match both text and actions?
<dominikh>
remember that normal messages include actions
<eebs>
yes, with 'action ' prepended. I suppose I could just put that in my regex
<dominikh>
no, not with "action " prepended. well, sort of. it's a CTCP message, with CTCP markers. so yeah, if you do want to apply a regexp, it's easiest to have two matchers
<eebs>
well, it's actually my empty regex :P
<eebs>
I'm trying to get 'high fives X' and '/me high fives X' to both match
<dominikh>
pick your poison. Hack is, well, hacky but shorter
<dominikh>
NoHack is the somewhat cleaner way
<dominikh>
(of course you'd move the common code into its own method)
<eebs>
*nod* thanks, I'll take a look at this
<eebs>
To give you some context, I'm attempting to implement some of the basic features of xkcd's Bucket (https://github.com/zigdon/xkcd-Bucket) to learn cinch a bit. Really enjoying cinch so far, simple but powerful
<dominikh>
(and a mess when dealing with actions ;))
<eebs>
:P
<dominikh>
personally I'd use the NoHack solution
<dominikh>
the Hack one is leaking protocol details into the code
<eebs>
yeah, I'm fine with more verbosity if it makes it clearer
apt-get_ has quit [Ping timeout: 245 seconds]
sarkyniin has joined #cinch
rikai has quit [Ping timeout: 250 seconds]
rikai has joined #cinch
britneywright has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
djbkd has quit [Read error: Connection reset by peer]
_djbkd has joined #cinch
_djbkd has quit [Remote host closed the connection]
sarkyniin has quit [Remote host closed the connection]