Comparison

plugins/mod_console.lua @ 2054:a43aea9b0bd1

mod_console: Added proper cleanup for disconnected console sessions.
author Waqas Hussain <waqas20@gmail.com>
date Sun, 25 Oct 2009 21:21:25 +0500
parent 2010:1a4f14ea39b6
child 2087:5efd79871205
comparison
equal deleted inserted replaced
2053:f5a198127dd3 2054:a43aea9b0bd1
125 end 125 end
126 session.send(string.char(0)); 126 session.send(string.char(0));
127 end 127 end
128 128
129 function console_listener.disconnect(conn, err) 129 function console_listener.disconnect(conn, err)
130 130 local session = sessions[conn];
131 if session then
132 session.disconnect();
133 sessions[conn] = nil;
134 end
131 end 135 end
132 136
133 connlisteners_register('console', console_listener); 137 connlisteners_register('console', console_listener);
134 138
135 -- Console commands -- 139 -- Console commands --