Completion
* commands completion
* common hooks lua interface
* complete separation of features into modules
-- BEEPING ON ALL MESSAGES
beep_enable = false
-- FIXME: add generic cid generation routine
boolean_cid = main.command ( 'beep',
function ( args )
local enable = yesno ( args )
if enable ~= nil then
beep_enable = enable
end
if beep_enable then
hooks_d['hook-message-in'].beep = main.beep
print ( "Beep on message is enabled" )
else
hooks_d['hook-message-in'].beep = nil
print ( "Beep on message is disabled" )
end
end, { 'enable', 'disable', 'yes', 'no', 'true', 'false', 'on', 'off' } )
commands_help['beep'] = "[enable|disable|on|off|yes|no|true|false]\n\nEnables or disables beeping on all messages.\nIf state is omitted, prints current state."
-- vim: se ts=4: --