Comparison

plugins/presence.lua @ 406:3c732f1d990c

plugins.presence: If a string is given as presece options, use it as status
author Kim Alvefur <zash@zash.se>
date Sat, 04 Jun 2016 13:37:06 +0200
parent 405:f065fc1fab0a
child 476:c34b263499be
comparison
equal deleted inserted replaced
405:f065fc1fab0a 406:3c732f1d990c
25 p:tag("priority"):text(tostring(opts.priority or opts.prio)):up(); 25 p:tag("priority"):text(tostring(opts.priority or opts.prio)):up();
26 end 26 end
27 if opts.status or opts.msg then 27 if opts.status or opts.msg then
28 p:tag("status"):text(opts.status or opts.msg):up(); 28 p:tag("status"):text(opts.status or opts.msg):up();
29 end 29 end
30 elseif type(opts) == "string" then
31 p:tag("status"):text(opts):up();
30 end 32 end
31 -- TODO maybe use opts as prio if it's a int,
32 -- or as show or status if it's a string?
33 33
34 stream:send(p); 34 stream:send(p);
35 end 35 end
36 end 36 end