From 8ff22344af60a8f1d7de4501f04c7f659bd5bb08 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Sun, 2 Jun 2013 21:59:25 +0000 Subject: LuaWindow: Fixed memory leaks with unclosed windows A player disconnecting will now force all windows to close, not respecting any plugin's overrides. http://forum.mc-server.org/showthread.php?tid=1146&pid=8350#pid8350 git-svn-id: http://mc-server.googlecode.com/svn/trunk@1543 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- MCServer/Plugins/Debuggers/Debuggers.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'MCServer/Plugins') diff --git a/MCServer/Plugins/Debuggers/Debuggers.lua b/MCServer/Plugins/Debuggers/Debuggers.lua index a9e834361..1d441d8fb 100644 --- a/MCServer/Plugins/Debuggers/Debuggers.lua +++ b/MCServer/Plugins/Debuggers/Debuggers.lua @@ -582,10 +582,10 @@ function HandleTestWndCmd(a_Split, a_Player) -- Test out the OnClosing callback's ability to refuse to close the window local attempt = 1; - local OnClosing = function(Window, Player) - Player:SendMessage("Window closing attempt #" .. attempt); + local OnClosing = function(Window, Player, CanRefuse) + Player:SendMessage("Window closing attempt #" .. attempt .. "; CanRefuse = " .. tostring(CanRefuse)); attempt = attempt + 1; - return (attempt <= 3); -- refuse twice, then allow + return CanRefuse and (attempt <= 3); -- refuse twice, then allow, unless CanRefuse is set to true end -- Log the slot changes -- cgit v1.2.3