aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_scansion_record.lua
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/mod_scansion_record.lua')
-rw-r--r--plugins/mod_scansion_record.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/plugins/mod_scansion_record.lua b/plugins/mod_scansion_record.lua
index 0ee22778..defbbee4 100644
--- a/plugins/mod_scansion_record.lua
+++ b/plugins/mod_scansion_record.lua
@@ -23,6 +23,14 @@ local function record_header(string)
head:write(string);
end
+local function record_object(class, name, props)
+ head:write(("[%s] %s\n"):format(class, name));
+ for k,v in pairs(props) do
+ head:write(("\t%s: %s\n"):format(k, v));
+ end
+ head:write("\n");
+end
+
local function record_event(session, event)
record(session.scansion_id.." "..event.."\n\n");
end
@@ -67,6 +75,11 @@ module:hook("resource-bind", function (event)
session.scansion_device = device;
session.scansion_id = user.character..(device ~= "" and "'s "..device or device);
+ record_object("Client", user.character, {
+ jid = session.full_jid,
+ password = "password",
+ });
+
module:log("warn", "Connected: %s's %s", user.character, device);
record_event(session, "connects");