|
# File rbot/ircbot.rb, line 424
def help(topic=nil)
topic = nil if topic == ""
case topic
when nil
helpstr = "help topics: core, auth, keywords"
helpstr += @plugins.helptopics
helpstr += " (help <topic> for more info)"
when /^core$/
helpstr = corehelp
when /^core\s+(.+)$/
helpstr = corehelp $1
when /^auth$/
helpstr = @auth.help
when /^auth\s+(.+)$/
helpstr = @auth.help $1
when /^keywords$/
helpstr = @keywords.help
when /^keywords\s+(.+)$/
helpstr = @keywords.help $1
else
unless(helpstr = @plugins.help(topic))
helpstr = "no help for topic #{topic}"
end
end
return helpstr
end
|