diff options
author | Diego Martinez <kaeza@users.sf.net> | 2015-10-26 19:51:46 -0300 |
---|---|---|
committer | Diego Martinez <kaeza@users.sf.net> | 2015-10-26 19:51:46 -0300 |
commit | 0314ced29270c03d8bb3c0a78319dea9b7333a5f (patch) | |
tree | 755f64d7999948cd0cdad98836358ca461f2894d | |
parent | 76187dbf212bb9953a23ccb2ca9a4c93c992d2b3 (diff) | |
download | xban2-0314ced29270c03d8bb3c0a78319dea9b7333a5f.tar.gz xban2-0314ced29270c03d8bb3c0a78319dea9b7333a5f.tar.bz2 xban2-0314ced29270c03d8bb3c0a78319dea9b7333a5f.zip |
Add source of ban to `get_record`.
-rw-r--r-- | init.lua | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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 |