diff --git a/commands/phish.js b/commands/phish.js index a2d8f8b..e24fb31 100644 --- a/commands/phish.js +++ b/commands/phish.js @@ -45,20 +45,20 @@ function gen(height, width, type) { sendUpstream(output) } -if (height > 100) { +if (height > config.phish.max_height) { consoleLog('[phish] Height requesteed was over the maximum allowable amount, defaulting to maximum') - height = 100 + height = config.phish.max_height } -if (width > 100) { +if (width > config.phish.max_width) { consoleLog('[phish] Width requesteed was over the maximum allowable amount, defaulting to maximum') - width = 100 + width = config.phish.max_width } if (height == undefined) { - consoleLog('[phish] Height was not specified, defaulting to 5') - height = 6 + consoleLog('[phish] Height was not specified, defaulting to '+config.phish.default_height) + height = config.phish.default_height } if (width == undefined) { - consoleLog('[phish] Width was not specified, defaulting to 5') - width = 10 + consoleLog('[phish] Width was not specified, defaulting to '+config.phish.default_width) + width = config.phish.default_width } gen(height, width, type) \ No newline at end of file diff --git a/config/example.config.json b/config/example.config.json index 83d8d31..23b2cae 100644 --- a/config/example.config.json +++ b/config/example.config.json @@ -30,5 +30,11 @@ }, "misc": { "logging": "true" + }, + "phish": { + "default_height": "6", + "default_width": "10", + "max_height": "100", + "max_width": "100" } } \ No newline at end of file