From cb0e1198a3b37228e9c50fa67b90dfe9eaa1aa65 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sat, 22 Sep 2018 14:07:49 +0200 Subject: mod_scansion_record: Correctly retrieve resource --- plugins/mod_scansion_record.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/mod_scansion_record.lua b/plugins/mod_scansion_record.lua index 4b807993..956e5f6c 100644 --- a/plugins/mod_scansion_record.lua +++ b/plugins/mod_scansion_record.lua @@ -42,11 +42,11 @@ module:hook("resource-bind", function (event) }; end local user = users[session.username]; - local device = user.devices[event.resource]; + local device = user.devices[session.resource]; if not device then user.n_devices = user.n_devices + 1; device = devices[user.n_devices] or ("device"..id.short()); - user.devices[event.resource] = device; + user.devices[session.resource] = device; end session.scansion_character = user.character; session.scansion_device = device; -- cgit v1.2.3