Permalink
Browse files

add some more comments

  • Loading branch information...
esmil committed Jan 13, 2012
1 parent b3feb17 commit bce0d7402d16a446dbf1454304b0d39c9eabdc57
Showing with 9 additions and 0 deletions.
  1. +9 −0 drinkomatic.lua
View
@@ -22,6 +22,9 @@ local function exit()
utils.exit(1)
end
+--- spawn coroutines to read from ---
+--- inputs and add to the input queue ---
+
utils.spawn(function()
local stdin = streams.stdin
while true do
@@ -47,6 +50,8 @@ utils.spawn(function()
end
end)
+--- some helper functions ---
+
local function login(hash, id)
local r = assert(db:fetchone("\z
SELECT id, member, balance \z
@@ -450,6 +455,10 @@ DEPOSIT = {
},
}
+--
+-- This is functions reads from the input queue
+-- and "runs" the state machine
+--
local function run()
local valid_sender = {
timeout = true,

0 comments on commit bce0d74

Please sign in to comment.