# HG changeset patch # User Kim Alvefur # Date 1456158731 -3600 # Node ID 8af558965da3e1a06f6834ef49b5a1ded476bf8d # Parent 0d7f802638135a3f465733eaa017ccd6c9ff00ed util.session: Fix luacheck warnings diff -r 0d7f80263813 -r 8af558965da3 util/session.lua --- a/util/session.lua Mon Feb 22 17:30:12 2016 +0100 +++ b/util/session.lua Mon Feb 22 17:32:11 2016 +0100 @@ -9,13 +9,13 @@ end local function set_id(session) - local id = typ .. tostring(session):match("%x+$"):lower(); + local id = session.type .. tostring(session):match("%x+$"):lower(); session.id = id; return session; end local function set_logger(session) - local log = logger.init(id); + local log = logger.init(session.id); session.log = log; return session; end @@ -30,7 +30,7 @@ local conn = session.conn; if not conn then function session.send(data) - log("debug", "Discarding data sent to unconnected session: %s", tostring(data)); + session.log("debug", "Discarding data sent to unconnected session: %s", tostring(data)); return false; end return session;