diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2010-08-03 16:56:56 +0200 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2010-08-03 16:56:56 +0200 |
commit | 664c0aa4e4e23b01799b397dd551c3a09bf870bf (patch) | |
tree | de5de7a94587bf0097fece1e8a0f3b56a9ed5a85 /data/rbot/plugins/games | |
parent | bdaf120460c0d0b6be3a037beebf3bc05d8746fe (diff) |
hangman: fix playing with a private message
The target was being of the wrong class (String vs Irc::Channel),
busting all the hash lookups.
Diffstat (limited to 'data/rbot/plugins/games')
-rw-r--r-- | data/rbot/plugins/games/hangman.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/data/rbot/plugins/games/hangman.rb b/data/rbot/plugins/games/hangman.rb index b7db886e..7cfd9e69 100644 --- a/data/rbot/plugins/games/hangman.rb +++ b/data/rbot/plugins/games/hangman.rb @@ -303,11 +303,11 @@ class HangmanPlugin < Plugin target = if m.public? m.channel else - params[:channel] + @bot.server.channel(params[:channel]) end # is the bot on the channel? - unless @bot.server.channels.names.include?(target.to_s) + unless @bot.myself.channels.include?(target) m.reply _("i'm not on that channel") return end |