# HG changeset patch # User Kim Alvefur # Date 1356701542 -3600 # Node ID f79be67e56661243c574daccb89e56746eae1c32 # Parent 8585f3cc4976b66fa02b78e35dd00c0aaec74f0e mod_admin_telnet: Stop processing lines when session is closed diff -r 8585f3cc4976 -r f79be67e5666 plugins/mod_admin_telnet.lua --- a/plugins/mod_admin_telnet.lua Fri Dec 28 14:26:21 2012 +0100 +++ b/plugins/mod_admin_telnet.lua Fri Dec 28 14:32:22 2012 +0100 @@ -149,6 +149,7 @@ end for line in data:gmatch("[^\n]*[\n\004]") do + if session.closed then return end console:process_line(session, line); session.send(string.char(0)); end @@ -168,6 +169,7 @@ function commands.bye(session) session.print("See you! :)"); + session.closed = true; session.disconnect(); end commands.quit, commands.exit = commands.bye, commands.bye;