summaryrefslogtreecommitdiff
path: root/lib/rbot/plugins.rb
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2007-03-19 22:50:54 +0000
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2007-03-19 22:50:54 +0000
commit0cb6065efddab6726fe778303802850ba5de08ee (patch)
tree899f909f97539a13fedb44b37b9f5d7d72676c74 /lib/rbot/plugins.rb
parent1a42c5ca1d7caad19f5ad26b4dad51731d597e8d (diff)
plugins: only show number of ignored and/or failed plugins only the first time a user asks for help
Diffstat (limited to 'lib/rbot/plugins.rb')
-rw-r--r--lib/rbot/plugins.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/rbot/plugins.rb b/lib/rbot/plugins.rb
index cc4b5372..7667ff84 100644
--- a/lib/rbot/plugins.rb
+++ b/lib/rbot/plugins.rb
@@ -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