From e1a8360b277c0b8ffd1da3698dbeae6af35a8a1b Mon Sep 17 00:00:00 2001 From: Douglas Gardner Date: Wed, 30 Jan 2013 12:27:08 +0000 Subject: [PATCH] add api key to config --- modules/rain/config.json | 3 ++- modules/rain/rain.js | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/rain/config.json b/modules/rain/config.json index eb3ca8c..e222ae7 100644 --- a/modules/rain/config.json +++ b/modules/rain/config.json @@ -1,5 +1,6 @@ { "dependencies": [ "command" ], "ignorable": true, - "help": "http://github.com/reality/depressionbot/blob/master/modules/rain/README.md" + "help": "http://github.com/reality/depressionbot/blob/master/modules/rain/README.md", + "apikey": "1234567890abcdef" } diff --git a/modules/rain/rain.js b/modules/rain/rain.js index 81b6feb..c6f2165 100644 --- a/modules/rain/rain.js +++ b/modules/rain/rain.js @@ -8,6 +8,7 @@ var request = require('request'), var rain = function(dbot) { var commands = { '~rain': function(event) { + var apikey = dbot.config.rain.apikey; var precip = event.params[1]; var score = 2 * Math.pow(precip,0.5); score = Math.ceil(score);