]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
Suppress a couple of warnings
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Tue, 6 Feb 2007 11:34:17 +0000 (11:34 +0000)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Tue, 6 Feb 2007 11:34:17 +0000 (11:34 +0000)
data/rbot/plugins/quiz.rb
data/rbot/plugins/rss.rb

index 0d1d9ee6dcbcea6559da116a137a9c817cd1aaa8..21af8e1cee953cdf2a20b3becffa35a1a593f54f 100644 (file)
@@ -601,7 +601,7 @@ class QuizPlugin < Plugin
 
   def cmd_top_number( m, params )
     num = params[:number].to_i
-    return unless 1..50 === num
+    return if num < 1 or num > 50
     chan = m.channel
     q = create_quiz( chan )
     if q.nil?
index 22a6dc18884b78f8c2236b712c586e216f961256..08b2c775761571136807e28067f54b0b729b0557 100644 (file)
@@ -341,7 +341,10 @@ class RSSFeedsPlugin < Plugin
   def change_rss(m, params)\r
     handle = params[:handle].downcase\r
     feed = @feeds.fetch(handle, nil)\r
-    return m.reply "No such feed with handle #{handle}" unless feed\r
+    unless feed\r
+      m.reply "No such feed with handle #{handle}"\r
+      return\r
+    end\r
     case params[:what].intern\r
     when :handle\r
       new = params[:new].downcase\r