From df0190afd743a8acc4768d5800c3b06650aa1c5b Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Sun, 27 Jan 2013 02:34:38 +0000 Subject: Debuggers: added some filtering to the API output, but still not good enough. git-svn-id: http://mc-server.googlecode.com/svn/trunk@1177 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- MCServer/Plugins/Debuggers/Debuggers.lua | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'MCServer/Plugins/Debuggers') diff --git a/MCServer/Plugins/Debuggers/Debuggers.lua b/MCServer/Plugins/Debuggers/Debuggers.lua index a619e0b0a..065237ba7 100644 --- a/MCServer/Plugins/Debuggers/Debuggers.lua +++ b/MCServer/Plugins/Debuggers/Debuggers.lua @@ -25,16 +25,18 @@ function Initialize(Plugin) function dump (prefix, a) for i, v in pairs (a) do if (type(v) == "table") then - if (v == _G) then - LOG(prefix .. i .. " == _G, CYCLE, ignoring"); - elseif (v == _G.package) then - LOG(prefix .. i .. " == _G.package, ignoring"); - else - dump(prefix .. i .. ".", v) + if (GetChar(i, 1) ~= ".") then + if (v == _G) then + LOG(prefix .. i .. " == _G, CYCLE, ignoring"); + elseif (v == _G.package) then + LOG(prefix .. i .. " == _G.package, ignoring"); + else + dump(prefix .. i .. ".", v) + end end elseif (type(v) == "function") then LOG(prefix .. i .. "()") - end + end end end dump("", _G); -- cgit v1.2.3