From 664c0aa4e4e23b01799b397dd551c3a09bf870bf Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Tue, 3 Aug 2010 16:56:56 +0200 Subject: hangman: fix playing with a private message The target was being of the wrong class (String vs Irc::Channel), busting all the hash lookups. --- data/rbot/plugins/games/hangman.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'data/rbot/plugins/games') 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 -- cgit v1.2.3