From 0314ced29270c03d8bb3c0a78319dea9b7333a5f Mon Sep 17 00:00:00 2001 From: Diego Martinez Date: Mon, 26 Oct 2015 19:51:46 -0300 Subject: [PATCH] Add source of ban to `get_record`. --- init.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/init.lua b/init.lua index 245d077..bcf62a4 100644 --- a/init.lua +++ b/init.lua @@ -140,12 +140,12 @@ function xban.get_record(player) end local record = { } for _, rec in ipairs(e.record) do - local msg + local msg = rec.reason or "No reason given." if rec.expires then - msg = ("%s, Expires: %s"):format( - rec.reason, os.date("%c", e.expires)) - else - msg = rec.reason + msg = msg..(", Expires: %s"):format(os.date("%c", e.expires)) + end + if rec.source then + msg = msg..", Source: "..rec.source end table.insert(record, ("[%s]: %s"):format(os.date("%c", e.time), msg)) end