Skip to content
Browse files

move throttleSeconds to config file

  • Loading branch information...
1 parent 16e9e29 commit 880fba2b2484e250eaaff290e355914d2ae61025 @aranasaurus aranasaurus committed Mar 3, 2013
Showing with 2 additions and 2 deletions.
  1. +1 −0 config.js
  2. +1 −2 meme.js
View
1 config.js
@@ -2,6 +2,7 @@ module.exports.api_url = 'http://meme.loqi.me';
module.exports.default_image = 'http://meme.loqi.me/img/aliens.jpg';
module.exports.default_pos = 'bottom';
module.exports.debug = false;
+module.exports.throttleSeconds = 0;
module.exports.detectors = [
{
regex: /(^I don't always .+) (but when I do,? .+$)/i,
View
3 meme.js
@@ -15,13 +15,12 @@ var debugLog = function(msg) {
// TODO: A test harness for detectors using their supplied testStrings.
var throttled = false;
-var throttleSeconds = 120;
function throttle() {
throttled = true;
setTimeout(function() {
throttled = false;
- }, throttleSeconds * 1000);
+ }, config.throttleSeconds * 1000);
}
zen.register_commands('meme.js', [{

0 comments on commit 880fba2

Please sign in to comment.
Something went wrong with that request. Please try again.