|
17 | 17 | $stderr.reopen(CONFIG.log_path, 'a')
|
18 | 18 | end
|
19 | 19 |
|
| 20 | +help_message = { |
| 21 | + "ctfs" => "display info about all events\n", |
| 22 | + "current" => "display info about current events\n", |
| 23 | + "upcoming" => "display info about upcoming events\n", |
| 24 | + "next" => "display info about the next event\n", |
| 25 | + "update" => "update the database (this happens automatically every hour)\n", |
| 26 | + "creds" => "modify the credentials database\n", |
| 27 | + "load" => "load the credentials database (if modified manually)\n" |
| 28 | +} |
| 29 | + |
| 30 | +help_message = help_message.map { |k, v| "#{CONFIG.prefix}#{k} - #{v}" }.join |
| 31 | + |
20 | 32 | bot = Cinch::Bot.new do
|
21 | 33 | configure do |c|
|
22 | 34 | c.server = CONFIG.server
|
|
27 | 39 | c.plugins.prefix = /^#{CONFIG.prefix || '!'}/
|
28 | 40 | c.plugins.options[CTFPlugin] = {
|
29 | 41 | lookahead: CONFIG.lookahead,
|
| 42 | + |
30 | 43 | mark_highschool: CONFIG.mark_highschool,
|
31 | 44 | announce_periods: CONFIG.announcement_periods,
|
32 |
| - help: "!ctfs - display info about all events\n" + |
33 |
| - "!current - display info about current events\n" + |
34 |
| - "!upcoming - display info about upcoming events\n" + |
35 |
| - "!next - display info about the next event\n" + |
36 |
| - "!update - update the database (this happens automatically every hour)\n" + |
37 |
| - "!creds - modify the credentials database\n" + |
38 |
| - "!load - load the credentials database (if modified manually)\n" |
| 45 | + help: help_message |
39 | 46 | }
|
40 | 47 | c.plugins.options[QuitPlugin] = {
|
41 | 48 | authorized: CONFIG.admins,
|
42 |
| - message: 'Leaving...', |
43 |
| - help: '!quit - leave the server (you have to be set as an admin in the config)' |
| 49 | + message: 'Leaving...' |
44 | 50 | }
|
45 | 51 | c.plugins.options[VersionPlugin] = { version: 'CTF-Bot v0.1. Get the source at https://github.com/LiquidLemon/CTF-Bot' }
|
46 | 52 | end
|
|
0 commit comments