Make the defaults and maximums for phish configurable
This commit is contained in:
parent
064b52ad3c
commit
744d27783b
@ -45,20 +45,20 @@ function gen(height, width, type) {
|
|||||||
sendUpstream(output)
|
sendUpstream(output)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (height > 100) {
|
if (height > config.phish.max_height) {
|
||||||
consoleLog('[phish] Height requesteed was over the maximum allowable amount, defaulting to maximum')
|
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')
|
consoleLog('[phish] Width requesteed was over the maximum allowable amount, defaulting to maximum')
|
||||||
width = 100
|
width = config.phish.max_width
|
||||||
}
|
}
|
||||||
if (height == undefined) {
|
if (height == undefined) {
|
||||||
consoleLog('[phish] Height was not specified, defaulting to 5')
|
consoleLog('[phish] Height was not specified, defaulting to '+config.phish.default_height)
|
||||||
height = 6
|
height = config.phish.default_height
|
||||||
}
|
}
|
||||||
if (width == undefined) {
|
if (width == undefined) {
|
||||||
consoleLog('[phish] Width was not specified, defaulting to 5')
|
consoleLog('[phish] Width was not specified, defaulting to '+config.phish.default_width)
|
||||||
width = 10
|
width = config.phish.default_width
|
||||||
}
|
}
|
||||||
gen(height, width, type)
|
gen(height, width, type)
|
@ -30,5 +30,11 @@
|
|||||||
},
|
},
|
||||||
"misc": {
|
"misc": {
|
||||||
"logging": "true"
|
"logging": "true"
|
||||||
|
},
|
||||||
|
"phish": {
|
||||||
|
"default_height": "6",
|
||||||
|
"default_width": "10",
|
||||||
|
"max_height": "100",
|
||||||
|
"max_width": "100"
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user