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


  • 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


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


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


  • 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).
    • 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 '-'.


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



See Also


Author: John Hodge ([email protected])