cinchrb / cinch

The IRC Bot Building Framework
http://www.rubydoc.info/gems/cinch
MIT License
1k stars 180 forks source link

Setting plugin-specific prefixes #98

Closed pfaffle closed 11 years ago

pfaffle commented 12 years ago

In the newest version of cinch it appears that setting a plugin-specific prefix no longer works the same way. Copying your example code in https://github.com/cinchrb/cinch/blob/master/examples/plugins/custom_prefix.rb verbatim and running it produces the error: bot.rb:7:in <class:SomeCommand>': wrong number of arguments (1 for 0) (ArgumentError) from bot.rb:4:in

'

I have Cinch 2.0.3 and Ruby 1.9.2p290 installed. Is there something I'm missing, or can you provide some new example code for setting a plugin-specific prefix? Thanks!

dominikh commented 11 years ago

It has to be self.prefix = ... or set :prefix, ... instead. I'll fix the example when I get to it.