ChanServ changed the topic of #cinch to: The IRC Framework | http://groups.google.com/group/cinch-ruby/ | Latest version: Cinch 2.0.4 – Change log at http://bit.ly/14Q4s6Z – Migration guide at http://bit.ly/GO4qkW | This channel is being publicly logged at http://irclog.whitequark.org/cinch/
<rhys> i kept trying to figure out why nothing work. Just tried this example. https://github.com/cinchrb/cinch/blob/master/examples/plugins/custom_prefix.rb
<dominikh> and how does it not work
<rhys> cinch does not respond to either in channel messages nor PMs
<rhys> somecommand, !somecommand, ^somecommand
<Rennex> are you talking to the right bot?
<dominikh> why ^somecommand? for that particular example, it would be ~somecommand
<rhys> OH
<dominikh> since the prefix is /^~/ and ^ is the "beginning of line" anchor
<rhys> right regex
<rhys> so match /^stats (.+)/ with no prefix specified should match !stats at the beginning of the line?
<dominikh> you don't want the ^ in the match. if you have the default prefix, that's /^!/
<dominikh> and ^!^stats wouldn't make sense
<rhys> and you can have listen_to and match in the same plugin ?
<dominikh> as many as you wish
<rhys> https://gist.github.com/rhysrhaven/5289171 i'm doing something really wrong then.
<Cinchy> [gist] cinch plugin.rb (at gist.github.com, rhysrhaven on 2013-04-02 01:07)
<rhys> maybe its a problem with stathash being empty
<rhys> i added a line to m.reply "testing" and still get no response.
<rhys> the listen and timed threads all seem to work
<dominikh> what do you expect to happen and what happens instead?
<rhys> i expect it to dump that hash to the channel when i type !stats, even if its nil.
<dominikh> show me the debug output.
<rhys> when i put a "debug stathash" in the timed function it works fine.
<rhys> ah. sure
<dominikh> and you realise that plain "!stats" will not call it, because the regexp is /stats (.+)/ so it expects a space and at least one more character after that?
<rhys> now i do.
<dominikh> you might want to learn regular expressions ;)
<rhys> no, i know regular expressions. just completely overlooked that it was + not !
<rhys> or * i should say
<rhys> * is zero or more, + is one or more
<dominikh> even with * there'd still be the space ;)
<rhys> that and i'm just learning ruby i expected everything i do just to blow up in my face.
<dominikh> it's ruby. it rarely blows up, it magically fails :P
<rhys> and it works. works beautifully.
<rhys> thanks. now i can do all sorts of stuff following this pattern.
<dominikh> :)
qo has quit [Remote host closed the connection]
qb has joined #cinch
qb has quit [Remote host closed the connection]
qb has joined #cinch
DaDaDOSPrompt has joined #cinch
DaDaDOSPrompt has left #cinch [#cinch]
sacc91 has quit [Quit: sacc91]
sacc91 has joined #cinch
sacc91 has quit [Client Quit]
sacc91 has joined #cinch
jhaals has joined #cinch
sacc91 has quit [Remote host closed the connection]
sacc91 has joined #cinch
bhaak has quit [Ping timeout: 256 seconds]
rickmasta has quit [Quit: Leaving...]
rikai_ is now known as rikai
postmodern has quit [Quit: Leaving]
rhys has quit [Quit: Leaving]
v0n has joined #cinch
bean has joined #cinch
rickmasta has joined #cinch
jhaals has quit [Ping timeout: 256 seconds]
bhaak has joined #cinch
rickmasta has quit [Quit: Leaving...]
rickmasta has joined #cinch
rickmasta has quit [Ping timeout: 252 seconds]
rickmasta has joined #cinch
bean has quit [Quit: Computer has gone to sleep.]
rickmasta has quit [Quit: Leaving...]
brandon|_ has quit [Remote host closed the connection]
bean has joined #cinch
bean has quit [Ping timeout: 255 seconds]
bean has joined #cinch
bean has quit [Ping timeout: 245 seconds]
bean has joined #cinch
Dxbydt has joined #cinch
rickmasta has joined #cinch
rickmasta has quit [Read error: Connection reset by peer]
rickmasta has joined #cinch
bean has quit [Ping timeout: 246 seconds]
Dxbydt is now known as Retik
bean has joined #cinch
rickmasta has quit [Ping timeout: 245 seconds]
bean has quit [Ping timeout: 252 seconds]
bean has joined #cinch
postmodern has joined #cinch
bean has quit [Quit: Textual IRC Client: www.textualapp.com]
bean has joined #cinch
rickmasta has joined #cinch
bean has quit [Quit: Computer has gone to sleep.]
postmodern has quit [Quit: Leaving]
postmodern has joined #cinch
rickmasta has quit [Quit: Leaving...]