]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
Suppress warnings about unitialized variables
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Sun, 16 Aug 2009 14:05:33 +0000 (16:05 +0200)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Sun, 16 Aug 2009 14:06:47 +0000 (16:06 +0200)
hangman: an unneeded letters accessor was defined
ircbot: restore initializations removed by previous commit

data/rbot/plugins/games/hangman.rb
lib/rbot/ircbot.rb

index c0a5ddc32c14590c0e25948758e24356d55c0b78..2a4bf33851419867f103ad36dcd47a1f83ee1165 100644 (file)
@@ -63,7 +63,7 @@ class Hangman
 end
 
 class Hangman
-  attr_reader :misses, :guesses, :word, :letters, :scores
+  attr_reader :misses, :guesses, :word, :scores
 
   STAGES = [' (x_x) ', ' (;_;) ', ' (>_<) ', ' (-_-) ', ' (o_~) ', ' (^_^) ', '\(^o^)/']
   HEALTH = STAGES.size-1
index 6c8d6332b38e16177709f0cd45655741909ee588..8b4dbaeb127e2b20b2ea89f365f8b0b263a570b8 100644 (file)
@@ -468,6 +468,11 @@ class Bot
       exit 2
     end
 
+    # Time at which the last PING was sent
+    @last_ping = nil
+    # Time at which the last line was RECV'd from the server
+    @last_rec = nil
+
     @startup_time = Time.new
 
     begin