Sha256: b700331baab5abd3239750954aad10f4f5f281c2a19301bc4d3ea037dad2a22b
Contents?: true
Size: 403 Bytes
Versions: 2
Compression:
Stored size: 403 Bytes
Contents
module Cinch::Plugins class Hangman include Cinch::Plugin match /hang guess (.*)/i, :method => :guess match /hang new (#\S*) (.*)/i, :method => :new_game def new_game(m, channel, answer) @game = CinchHangman::Game.new(answer) Channel(channel).send(@game.describe) end def guess(m, guess) @game.guess(guess) m.reply @game.describe end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
cinch_hangman-0.0.5 | lib/cinch/plugins/hangman.rb |
cinch_hangman-0.0.4 | lib/cinch/plugins/hangman.rb |