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
Sub-Commands
- All users
- give user amount reason
- Give some money to another user (e.g. for pizza).
- List users (including balances and flags).
- door Open the UCC door.
- acct user [+-]amount 'reason'
- Alter a user's balance by amount cents, leaving a reason for the coke logs.
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.
- Update a slot's contents (name and price).
- acct user =amount 'reason'
- Set a user's balance to a number of cents.
- Create a new account with the specified username.
- 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 '-'.
- give user amount reason
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])