aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/session.lua7
1 files changed, 7 insertions, 0 deletions
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;
}