Permalink
Browse files

use match instead of listen_to

  • Loading branch information...
1 parent 5b6750f commit 9adb3de10c24a0847f333b2a6a304ec1a9f64f73 @dominikh dominikh committed Mar 4, 2012
Showing with 1 addition and 3 deletions.
  1. +1 −3 lib/cinch/plugins/identify.rb
@@ -23,9 +23,7 @@ def identify(m)
end
end
- # TODO as soon as Cinch 1.2.0 is released, use match and
- # react_on instead
- listen_to :notice, method: :challengeauth
+ match(/^CHALLENGE (.+?) (.+)$/, use_prefix: false, use_suffix: false, reacting_on: :notice)
def challengeauth(m)
return unless m.user && m.user.nick == "Q"
if match = m.message.match(/^CHALLENGE (.+?) (.+)$/)

0 comments on commit 9adb3de

Please sign in to comment.