Changeset

12640:999b1c59af6f

util.session: Add role management methods
author Matthew Wild <mwild1@gmail.com>
date Wed, 15 Jun 2022 11:37:09 +0100
parents 12638:a47af78a9347
children 12641:e9865b0cfb89
files util/session.lua
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/util/session.lua	Thu Aug 18 15:43:16 2022 +0100
+++ b/util/session.lua	Wed Jun 15 11:37:09 2022 +0100
@@ -57,10 +57,16 @@
 	return session;
 end
 
+local function set_role(session, role)
+	session.role = role;
+end
+
 return {
 	new = new_session;
+
 	set_id = set_id;
 	set_logger = set_logger;
 	set_conn = set_conn;
 	set_send = set_send;
+	set_role = set_role;
 }