Skip to content

Commit

Permalink
Only fire joke method once for 'joke me' command.
Browse files Browse the repository at this point in the history
  • Loading branch information
rwjblue committed Jan 18, 2013
1 parent 326a8f6 commit f1e2093
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions plugin/reddit_joke_cinch_plugin.rb
Expand Up @@ -13,8 +13,7 @@ def self.commands
PluginCommand.new("'.joke me', '.joke'", "Random joke from reddit.com/r/jokes.")
end

match /joke me/i, method: :joke
match /joke/i, method: :joke
match /joke(?: me)?/i, method: :joke
def joke(m)
m.reply random_joke
end
Expand Down

0 comments on commit f1e2093

Please sign in to comment.