|
13 | 13 | import cloudbot |
14 | 14 |
|
15 | 15 |
|
| 16 | +def _get_repo_link(bot): |
| 17 | + return bot.config.get( |
| 18 | + 'repo_link', 'https://github.com/snoonetIRC/CloudBot/' |
| 19 | + ) |
| 20 | + |
| 21 | + |
16 | 22 | @hook.command(autohelp=False) |
17 | | -def about(text, conn): |
| 23 | +def about(text, conn, bot): |
18 | 24 | """- Gives information about CloudBot. Use .about license for licensing information""" |
19 | 25 | if text.lower() in ("license", "gpl", "source"): |
20 | 26 | return "CloudBot Refresh is released under the GPL v3 license, get the source code " \ |
21 | | - "at https://github.com/CloudBotIRC/CloudBot/" |
| 27 | + "at {}".format(_get_repo_link(bot)) |
22 | 28 |
|
23 | | - return "{} is powered by CloudBot Refresh! ({}) - " \ |
24 | | - "https://github.com/CloudBotIRC/CloudBot/".format(conn.nick, cloudbot.__version__) |
| 29 | + return "{} is powered by CloudBot Refresh! ({}) - {}".format( |
| 30 | + conn.nick, cloudbot.__version__, _get_repo_link(bot) |
| 31 | + ) |
25 | 32 |
|
26 | 33 |
|
27 | 34 | @hook.command(autohelp=False) |
@@ -70,8 +77,8 @@ def system(reply, message): |
70 | 77 |
|
71 | 78 |
|
72 | 79 | @hook.command("sauce", "source", autohelp=False) |
73 | | -def sauce(): |
| 80 | +def sauce(bot): |
74 | 81 | """- Returns a link to the source""" |
75 | 82 | return "Check out my source code! I am a fork of cloudbot: " \ |
76 | 83 | "https://github.com/CloudBotIRC/CloudBot/ and my source is here: " \ |
77 | | - "https://github.com/edwardslabs/CloudBot" |
| 84 | + "{}".format(_get_repo_link(bot)) |
0 commit comments