Pep improvements
* Send empty only if changed
* Incoming mood and activity handlers
-- ROOM NICK COMPLETION
room_cid = main.command ( 'priv',
function ( args )
main.run ( 'room privmsg ' .. args )
end, {} )
commands_help['priv'] = "nick message\n\nSends private message to room participant. Nick completion available! ;)"
registered_nicks = {}
function register_nicks ()
for k, nick in pairs ( registered_nicks ) do
main.del_completion ( room_cid, nick )
end
local buddy = main.current_buddy ()
if buddy then
local info = main.buddy_info ( buddy )
if info then
registered_nicks = { }
if info.type == 'room' then
for nick, k in pairs ( info.resources ) do
main.add_completion ( room_cid, nick )
table.insert ( registered_nicks, nick )
end
end
end
end
end
main.run ( 'bind 338 = lua main.run ( "roster down" ); register_nicks ()' )
main.run ( 'bind 339 = lua main.run ( "roster up" ); register_nicks ()' )
hooks_d['hook-quit'].room_priv =
function ( args )
main.run ( 'bind 338 = roster down' )
main.run ( 'bind 339 = roster up' )
end
-- vim: se ts=4: --