This page will most likely be the basis for the man page for OpenDispense2, so I've included all the usual stuff -- BobAdamson

Description

  • The dispense command provides access to the UCC's coke machine and other systems. It can be used to drop a drink, open the door, or pay for other items. If called with no arguments, dispense displays an interactive list of avaliable items. This list can be navigated using the arrow keys, enter/return (for select) and q/ESC to quit. If the first argument is not a recognised command (see below) then dispense attempts to interpret the argument as an item name, and if it matches, dispenses the item.

DB Details

Syntax

  • dispense [-hG] [-u user] dispense [-u user] item dispense [-u user] command args...

Options

  • -h, --help
    • Display a list of commands and options
    -G Use a non-interactive list instead of the ncurses interface.

Sub-Commands

  • All users
    • give user amount reason
      • Give some money to another user (e.g. for pizza).
      acct [user]
      • List users (including balances and flags).
    Door Members
    • door Open the UCC door.
    Coke Controllers
    • acct user [+-]amount 'reason'
      • Alter a user's balance by amount cents, leaving a reason for the coke logs.
      refund user item_id [price]
      • Refund a bad dispense for a user (the item_id can be found in the coke log usually). It is is of the form <type>:<slot>, for example coke:6 or snack:33.

      slot item_id price name
      • Update a slot's contents (name and price).
    Administrators
    • acct user =amount 'reason'
      • Set a user's balance to a number of cents.
      user add username
      • Create a new account with the specified username.
      user type username flags
      • Alter the flags on a user. Valid flags are user, coke, admin, internal and disabled. Flags can be removed by prepending the flag with a '-'.

Examples

Diagnostics and Exit Codes

  • 0 Success 1 Invalid item selected 2 Bad username for acct or -u 3 You are not permitted to perform that action 4 Invalid arguments passed 5 Insufficient balance avaliable -1 Unknown error -2 Socket/connection error of some form -3 Unknown response from the server

Configuration

Files

See Also

Acknowledgements

Author: John Hodge ([email protected])