Skip to content

Commit d3f3b9d

Browse files
committed
Prepare release 1.0.4
1 parent e6f061a commit d3f3b9d

4 files changed

Lines changed: 15 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
## Changelog
2+
- **1.0.4** - Adjust ratelimiter cleanup task, add octopart API key, fix brainfuck, sort mcstatus output.
23
- **1.0.3** - More minor changes to plugins, fixed rate-limiting properly, banished SCP to CloudBotIRC/Plugins, added wildcard support to permissions (note: don't use this yet, it's still not entirely finalized!)
34
- **1.0.2** - Minor internal changes and fixes, banished minecraft_bukget and worldofwarcraft to CloudBotIRC/Plugins
45
- **1.0.1** - Fix history.py tracking

cloudbot/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import logging
1111
import os
1212

13-
__version__ = "1.0.3"
13+
__version__ = "1.0.4"
1414

1515
__all__ = ["util", "bot", "connection", "config", "permissions", "plugin", "event", "hook", "log_dir"]
1616

config.default.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@
7979
"wunderground": "",
8080
"rdio_key": "",
8181
"rdio_secret": "",
82-
"google_dev_key": ""
82+
"google_dev_key": "",
83+
"octopart": ""
8384
},
8485
"database": "sqlite:///cloudbot.db",
8586
"plugin_loading": {

plugins/octopart.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,20 @@
77
API_URL = "http://octopart.com/api/v3/parts/search"
88

99

10-
@hook.command("octopart", "octosearch")
10+
@hook.on_start()
11+
def load_key(bot):
12+
global api_key
13+
api_key = bot.config.get("api_keys", {}).get("octopart", None)
14+
15+
16+
@hook.command("octopart", "octo")
1117
def octopart(text, reply):
1218
"""octopart <keyword> -- Search for any part on the Octopart database."""
19+
if not api_key:
20+
return "Octopart API key required."
21+
1322
params = {
14-
'apikey': 'aefcd00e',
23+
'apikey': api_key,
1524
'q': text,
1625
'start': 0,
1726
'limit': 1

0 commit comments

Comments
 (0)