# HG changeset patch # User Matthew Wild # Date 1262899487 0 # Node ID 19c5a66837edf55e459ecf493d6a82910ead1f9e # Parent cdeb02d9546d574d2fa365c5e3c7e1ba9149207f clix.receive: Suppress history from chatrooms unless -h/--history is supplied diff -r cdeb02d9546d -r 19c5a66837ed clix/receive.lua --- 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