plugins/presence.lua

changeset 405
f065fc1fab0a
parent 404
7c6a610c3ff5
child 406
3c732f1d990c
equal deleted inserted replaced
404:7c6a610c3ff5 405:f065fc1fab0a
19 local p = verse.presence(); 19 local p = verse.presence();
20 if type(opts) == "table" then 20 if type(opts) == "table" then
21 if opts.show then 21 if opts.show then
22 p:tag("show"):text(opts.show):up(); 22 p:tag("show"):text(opts.show):up();
23 end 23 end
24 if opts.prio then 24 if opts.priority or opts.prio then
25 p:tag("priority"):text(tostring(opts.prio)):up(); 25 p:tag("priority"):text(tostring(opts.priority or opts.prio)):up();
26 end 26 end
27 if opts.msg then 27 if opts.status or opts.msg then
28 p:tag("status"):text(opts.msg):up(); 28 p:tag("status"):text(opts.status or opts.msg):up();
29 end 29 end
30 end 30 end
31 -- TODO maybe use opts as prio if it's a int, 31 -- TODO maybe use opts as prio if it's a int,
32 -- or as show or status if it's a string? 32 -- or as show or status if it's a string?
33 33

mercurial