summaryrefslogtreecommitdiff
path: root/lib/rbot/core
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2006-08-04 00:19:51 +0000
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2006-08-04 00:19:51 +0000
commit5aa914133c6482c500cf439d65584282212beb6b (patch)
tree0f41aad864af62ceeebb76578ba65020de896b7f /lib/rbot/core
parent6c470685174bdee375beb2d968059172d5689575 (diff)
Fix stupid bug introduced with the new debugging messages. switch to kind_of? instead of .class<=
Diffstat (limited to 'lib/rbot/core')
-rw-r--r--lib/rbot/core/auth.rb2
-rw-r--r--lib/rbot/core/config.rb4
-rw-r--r--lib/rbot/core/core.rb2
3 files changed, 4 insertions, 4 deletions
diff --git a/lib/rbot/core/auth.rb b/lib/rbot/core/auth.rb
index 9a30dc0a..228f76a8 100644
--- a/lib/rbot/core/auth.rb
+++ b/lib/rbot/core/auth.rb
@@ -85,7 +85,7 @@ class AuthModule < CoreBotModule
def auth_set(m, params)
cmds, locs, warns = parse_args(params[:args])
- errs = warns.select { |w| w.class <= Exception }
+ errs = warns.select { |w| w.kind_of?(Exception) }
unless errs.empty?
m.reply "couldn't satisfy your request: #{errs.join(',')}"
return
diff --git a/lib/rbot/core/config.rb b/lib/rbot/core/config.rb
index 3099a00a..29a0b564 100644
--- a/lib/rbot/core/config.rb
+++ b/lib/rbot/core/config.rb
@@ -89,7 +89,7 @@ class ConfigModule < CoreBotModule
m.reply "no such config key #{key}"
return
end
- unless @bot.config.items[key].class <= BotConfigArrayValue
+ unless @bot.config.items[key].kind_of?(BotConfigArrayValue)
m.reply "config key #{key} is not an array"
return
end
@@ -111,7 +111,7 @@ class ConfigModule < CoreBotModule
m.reply "no such config key #{key}"
return
end
- unless @bot.config.items[key].class <= BotConfigArrayValue
+ unless @bot.config.items[key].kind_of?(BotConfigArrayValue)
m.reply "config key #{key} is not an array"
return
end
diff --git a/lib/rbot/core/core.rb b/lib/rbot/core/core.rb
index 178675b1..feff7491 100644
--- a/lib/rbot/core/core.rb
+++ b/lib/rbot/core/core.rb
@@ -5,7 +5,7 @@
class CoreModule < CoreBotModule
def listen(m)
- return unless m.class <= PrivMessage
+ return unless m.kind_of?(PrivMessage)
if(m.private? && m.message =~ /^\001PING\s+(.+)\001/)
@bot.notice m.sourcenick, "\001PING #$1\001"
@bot.irclog "@ #{m.sourcenick} pinged me"