Add source of ban to get_record.

This commit is contained in:
Diego Martinez 2015-10-26 19:51:46 -03:00
parent 76187dbf21
commit 0314ced292

View File

@ -140,12 +140,12 @@ function xban.get_record(player)
end end
local record = { } local record = { }
for _, rec in ipairs(e.record) do for _, rec in ipairs(e.record) do
local msg local msg = rec.reason or "No reason given."
if rec.expires then if rec.expires then
msg = ("%s, Expires: %s"):format( msg = msg..(", Expires: %s"):format(os.date("%c", e.expires))
rec.reason, os.date("%c", e.expires)) end
else if rec.source then
msg = rec.reason msg = msg..", Source: "..rec.source
end end
table.insert(record, ("[%s]: %s"):format(os.date("%c", e.time), msg)) table.insert(record, ("[%s]: %s"):format(os.date("%c", e.time), msg))
end end