Permalink
Browse files

Fixing incorrect prefix syntax

The prefix should be set through 'set'.
Fixes issue #98 on the original repo.
  • Loading branch information...
1 parent 131527f commit 21e5a0d812d100e5d883975eabf4b0849dea88ba @FiXato committed Nov 1, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 examples/plugins/custom_prefix.rb
  2. +1 −1 examples/plugins/lambdas.rb
@@ -3,7 +3,7 @@
class SomeCommand
include Cinch::Plugin
- prefix /^~/
+ set :prefix, /^~/
match "somecommand"
def execute(m)
@@ -9,7 +9,7 @@ class DirectAddressing
#
# The reason we are using a lambda is that the bot's nick can change
# and the prefix has to be up to date.
- prefix lambda{ |m| Regexp.new("^" + Regexp.escape(m.bot.nick + ": " ))}
+ set :prefix, lambda{ |m| Regexp.new("^" + Regexp.escape(m.bot.nick + ": " ))}
match "hello", method: :greet
def greet(m)

0 comments on commit 21e5a0d

Please sign in to comment.