Applied patches from DAA
[tpg/opendispense2.git] / docs / dispense.1
1 .TH dispense 1 "June 17, 2011" "OpenDispense2" "USER COMMANDS"
2 .SH NAME
3 dispense \- OpenDispense2 command line client
4 .SH SYNOPSIS
5 .B dispense
6 [\-hG]
7 .RI "[\-u " "user" "]"
8 .PP
9 .B dispense
10 .RI "[\-u " "user" "]"
11 .I item
12 .PP
13 .B dispense
14 .RI "[\-u " "user" "]"
15 .I command
16 .I args...
17
18 .SH DESCRIPTION
19 The
20 .B dispense
21 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.
22
23 If called with no arguments,
24 .B dispense
25 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.
26
27 If the first argument is not a recognised command (see below) then
28 .B dispense
29 attempts to interpret the argument as an item name, and if it matches, dispenses the item.
30
31 .SH OPTIONS
32 .TP
33 \-h, \--help
34 Display a list of commands and options
35 .TP
36 \-G
37 Use a non-interactive list instead of the ncurses interface.
38
39 .SH SUB-COMMANDS
40 .SS "All users"
41 .TP
42 .RI "give " "user amount reason"
43 Give some money to another user (e.g. for pizza).
44
45 .TP
46 .RI "acct [" "user" "]"
47 List users (including balances and flags).
48
49 .SS "Door Members"
50 .TP
51 .RI "door"
52 Open the UCC door.
53
54 .SS "Coke Controllers"
55
56 .TP
57 .RI "acct " "user" " [+-]" "amount" " '" "reason" "'"
58 Alter a user's balance by
59 .I amount
60 cents, leaving a reason for the coke logs.
61
62 .TP
63 .RI "refund " "user item_id" " [" "price" "]"
64 Refund a bad dispense for a user (the item_id can be found in the coke log usually).
65 It is is of the form <type>:<slot>, for example coke:6 or snack:33.
66
67 .TP
68 .RI "slot " "item_id price name"
69 Update a slot's contents (name and price).
70
71 .SS "Administrators"
72
73 .TP
74 .RI "acct " "user" " =" "amount" " '" reason "'"
75 Set a user's balance to a number of cents.
76
77 .TP
78 .RI "user add " "username"
79 Create a new account with the specified username.
80
81 .TP
82 .RI "user type " "username flags"
83 Alter the flags on a user. Valid flags are user, coke, admin, internal and disabled.
84 Flags can be removed by prepending the flag with a '-'.
85
86 .SH EXIT STATUS
87
88 .TP
89 0
90 Success
91
92 .TP
93 1
94 Invalid item selected
95
96 .TP
97 2
98 Bad username for 
99 .B acct
100 or
101 .B -u
102
103 .TP
104 3
105 You are not permitted to perform that action
106
107 .TP
108 4
109 Invalid arguments passed
110
111 .TP
112 5
113 Insufficient balance avaliable
114
115 .TP
116 -1
117 Unknown error
118
119 .TP
120 -2
121 Socket/connection error of some form
122
123 .TP
124 -3
125 Unknown response from the server
126
127 .SH AUTHOR
128 John Hodge ([email protected])

UCC git Repository :: git.ucc.asn.au