local chatcommand_cmd = yl_ticker.settings.chatcommand_domain .. "_delete"
local chatcommand_definition = {
    params = "<ticker ID>",
    description = "Delete the ticker ID." ..
        "\nExample: /" .. yl_ticker.settings.chatcommand_domain .. "_delete 5",
    privs = {[yl_ticker.settings.admin_privs] = true},
    func = function(name, param)
        local success, message =
            yl_ticker.chatcommand_ticker_delete(name, param)

        if success then
            minetest.log("action", "[yl_ticker] player " .. name ..
                             " deleted ticker: " .. param)
            return true, message
        else
            minetest.log("warning",
                         "[yl_ticker] player " .. name ..
                             " deleted ticker: " .. param ..
                             " unsuccessfully, message: " .. message)
            return false, message
        end
    end
}

minetest.register_chatcommand(chatcommand_cmd, chatcommand_definition)
yl_ticker.register_help(chatcommand_cmd, chatcommand_definition)
