From a14df709ba6e9f143cf4d2f5d6b788831e5739d9 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Tue, 24 Nov 2015 19:26:27 +0100 Subject: util.session: How does a session relate do a connection? --- util/session.lua | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'util/session.lua') diff --git a/util/session.lua b/util/session.lua index 7703c265..03ddcf47 100644 --- a/util/session.lua +++ b/util/session.lua @@ -19,8 +19,15 @@ local function set_logger(session) return session; end +local function set_conn(session, conn) + session.conn = conn; + session.ip = conn:ip(); + return session; +end + return { new = new_session; set_id = set_id; set_logger = set_logger; + set_conn = set_conn; } -- cgit v1.2.3