diff options
Diffstat (limited to 'util')
-rw-r--r-- | util/session.lua | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/util/session.lua b/util/session.lua index 735b6165..6993842c 100644 --- a/util/session.lua +++ b/util/session.lua @@ -6,6 +6,13 @@ local function new_session(typ) return session; end +local function set_id(session) + local id = typ .. tostring(session):match("%x+$"):lower(); + session.id = id; + return session; +end + return { new = new_session; + set_id = set_id; } |