Software /
code /
prosody-modules
Changeset
1169:0ae2c250f274
mod_turncredentials: Use type-specific get_option() methods where appropriate, and pass in default values
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 28 Aug 2013 10:35:32 +0100 |
parents | 1168:0b6b33688b75 |
children | 1170:6695c3098025 |
files | mod_turncredentials/mod_turncredentials.lua |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_turncredentials/mod_turncredentials.lua Wed Aug 28 10:31:15 2013 +0100 +++ b/mod_turncredentials/mod_turncredentials.lua Wed Aug 28 10:35:32 2013 +0100 @@ -6,10 +6,10 @@ local hmac_sha1 = require "util.hashes".hmac_sha1; local base64 = require "util.encodings".base64; local os_time = os.time; -local secret = module:get_option("turncredentials_secret") or false; -local host = module:get_option("turncredentials_host") or false -- use ip addresses here to avoid further dns lookup latency -local port = module:get_option("turncredentials_port") or 3478 -local ttl = module:get_option("turncredentials_ttl") or 86400 +local secret = module:get_option_string("turncredentials_secret"); +local host = module:get_option_string("turncredentials_host"); -- use ip addresses here to avoid further dns lookup latency +local port = module:get_option_number("turncredentials_port", 3478); +local ttl = module:get_option_number("turncredentials_ttl", 86400); if not (secret and host) then module:log("error", "turncredentials not configured"); return;