]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
plugins: only show number of ignored and/or failed plugins only the first time a...
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Mon, 19 Mar 2007 22:50:54 +0000 (22:50 +0000)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Mon, 19 Mar 2007 22:50:54 +0000 (22:50 +0000)
lib/rbot/plugins.rb

index cc4b5372d0cf67a1cbb8c143da8d7b15943a40ef..7667ff84a6ccf6b549c9bba0a96ec79ebf6b1775 100644 (file)
@@ -277,6 +277,7 @@ module Plugins
       @botmodules[:Plugin].clear
       @names_hash.clear
       @commandmappers.clear
+      @failures_shown = false
     end
 
     # Associate with bot _bot_
@@ -489,15 +490,16 @@ module Plugins
         list << "no plugins active"
       end
       # Ignored plugins next
-      unless @ignored.empty?
+      unless @ignored.empty? or @failures_shown
         list << "; #{Underline}#{@ignored.length} plugin#{'s' if @ignored.length > 1} ignored#{Underline}"
         list << ": use #{Bold}help ignored plugins#{Bold} to see why" unless short
       end
       # Failed plugins next
-      unless @failed.empty?
+      unless @failed.empty? or @failures_shown
         list << "; #{Reverse}#{@failed.length} plugin#{'s' if @failed.length > 1} failed to load#{Reverse}"
         list << ": use #{Bold}help failed plugins#{Bold} to see why" unless short
       end
+      @failures_shown = true
       list
     end