blob: a25f6b844a8e004c5ac1f54cd1018adcf9fee253 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
if event.type == "punch" then
digiline_send("commit", {name, F.cac(name)})
end
if event.channel == "ack" then
local catch = event.msg
name = catch[1]
wm = catch[2]
if F.ack2(name, wm) then
digiline_send("ack_r", S.acc[name][wm])
else
digiline_send("ack_r", false)
end
end
if event.channel == "checkout" then
local catch = event.msg
name = catch[1]
wm = catch[2]
amount = catch[3]
if F.ack2(name, wm) and amount ~= nil then
S.acc[name][wm] = S.acc[name][wm] + amount
digiline_send("checkout_r", true)
else
digiline_send("checkout_r", false)
end
end
if event.channel == "create" then
local catch = event.msg
name = catch[1]
wm = catch[2]
am = catch[3]
F.adc(name, wm, am)
end
|