aboutsummaryrefslogtreecommitdiffstats
path: root/util/session.lua
blob: 6993842c732ef00004444372ea477bd797987a29 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

local function new_session(typ)
	local session = {
		type = typ .. "_unauthed";
	};
	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;
}