From ea67edfa992259717c97c3a591fa1bd9482625d1 Mon Sep 17 00:00:00 2001 From: Arief Bayu Purwanto Date: Wed, 18 Feb 2015 11:59:35 +0700 Subject: [PATCH] introduce "debug" config. Value is true/false (boolean) --- bot/utils.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bot/utils.lua b/bot/utils.lua index ec3ab82..3ad714e 100644 --- a/bot/utils.lua +++ b/bot/utils.lua @@ -84,6 +84,14 @@ function vardump(value, depth, key) local linePrefix = "" local spaces = "" + -- print("++++++++++ --> " .. _config.debug) + + if _config.debug ~= nil then + if _config.debug == false then + return "" + end + end + if key ~= nil then linePrefix = "["..key.."] = " end