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 --- source/Player.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/Player.h') diff --git a/source/Player.h b/source/Player.h index 5617b9785..c582c1802 100644 --- a/source/Player.h +++ b/source/Player.h @@ -93,11 +93,11 @@ public: // tolua_begin - /// Closes the current window, resets current window to m_InventoryWindow - void CloseWindow(void); + /// Closes the current window, resets current window to m_InventoryWindow. A plugin may refuse the closing if a_CanRefuse is true + void CloseWindow(bool a_CanRefuse = true); /// Closes the current window if it matches the specified ID, resets current window to m_InventoryWindow - void CloseWindowIfID(char a_WindowID); + void CloseWindowIfID(char a_WindowID, bool a_CanRefuse = true); cClientHandle * GetClientHandle(void) const { return m_ClientHandle; } -- cgit v1.2.3