Module: Zabbirc::Irc::Help
Defined Under Namespace
Modules: ClassMethods
Constant Summary collapse
- FEATURES =
{}
Instance Method Summary collapse
Instance Method Details
#help_features ⇒ Object
7 8 9 |
# File 'lib/zabbirc/irc/help.rb', line 7 def help_features FEATURES end |
#zabbirc_help(m) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/zabbirc/irc/help.rb', line 11 def zabbirc_help m op = authenticate m return unless op help = "#{op.nick}: Zabbirc - Zabbix IRC Bot - available commands: #{help_features.keys.join(", ")}. Type '!zabbirc help <command>' for detailed help" m.reply help end |
#zabbirc_help_detail(m, command) ⇒ Object
18 19 20 21 22 23 24 25 26 27 |
# File 'lib/zabbirc/irc/help.rb', line 18 def zabbirc_help_detail m, command op = authenticate m return unless op if cmd_help = help_features[command] help = "HELP #{command}: #{cmd_help}" else help = "Uknown command: #{command}" end m.reply("#{op.nick}: #{help}") end |