]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
fix minor warnings from figlet and imdb plugins
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Mon, 9 Apr 2007 20:34:32 +0000 (20:34 +0000)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Mon, 9 Apr 2007 20:34:32 +0000 (20:34 +0000)
data/rbot/plugins/figlet.rb
data/rbot/plugins/imdb.rb

index cf9ee8e8df664409046ccdf087e9af324937c2aa..b8561f4702ae4d26ced879a310c709aa966b98fa 100644 (file)
@@ -1,12 +1,13 @@
-DEFAULT_FONTS = ['rectangles', 'smslant']
-MAX_WIDTH=68
-
 class FigletPlugin < Plugin
+  DEFAULT_FONTS = ['rectangles', 'smslant']
+  MAX_WIDTH=68
+
   def initialize
     super
     @figlet_path = "/usr/bin/figlet"
 
     # check that figlet actually has the font installed
+    @figlet_font = nil
     for fontname in DEFAULT_FONTS
       # check if figlet can render this font properly
       if system("#{@figlet_path} -f #{fontname} test test test")
index a70b2b3b626d3bf798edcd761ca55d538eb311ac..78060142a89dba2d74a61370ad2188bf79ba92f2 100644 (file)
@@ -420,7 +420,7 @@ class ImdbPlugin < Plugin
       end
     end
     if info.length == 1
-      m.reply Utils.decode_html_entities info.first.join("\n")
+      m.reply Utils.decode_html_entities(info.first.join("\n"))
     else
       m.reply info.map { |si|
         Utils.decode_html_entities si.join(" | ")