Thu, 07 Jan 2010 21:24:47 +0000
clix.receive: Suppress history from chatrooms unless -h/--history is supplied
clix/receive.lua | file | annotate | diff | comparison | revisions |
--- a/clix/receive.lua Thu Jan 07 21:22:27 2010 +0000 +++ b/clix/receive.lua Thu Jan 07 21:24:47 2010 +0000 @@ -1,7 +1,10 @@ +short_opts.h = "history"; + return function (opts, args) local function on_message(message) local body = message:get_child("body"); - if body then + local delay = message:get_child("delay", "urn:xmpp:delay"); + if body and (not delay or opts.history) then print(body:get_text()); end end