summaryrefslogtreecommitdiff
path: root/shop2
diff options
context:
space:
mode:
authorubq323 <ubq323@ubq323.website>2023-01-14 20:53:43 +0000
committerubq323 <ubq323@ubq323.website>2023-01-14 20:53:43 +0000
commit36e4a20adae28ea066dcc80ec14d8350bc62e31a (patch)
tree9c708d18a2a5720898a61a9eef6c70d66a452b21 /shop2
parente7b18f0312c62cfca3c9a0a675b49f89cdd09223 (diff)
shop2
Diffstat (limited to 'shop2')
-rw-r--r--shop2/main.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/shop2/main.lua b/shop2/main.lua
index 20440a5..a79ab6f 100644
--- a/shop2/main.lua
+++ b/shop2/main.lua
@@ -41,7 +41,13 @@ local function proctrans(tr)
if tr.type ~= "transfer" then return end
if tr.sent_name ~= OURNAME then return end
local meta = parsemeta(tr.metadata)
- local function tell(msg) if meta.username then chatbox.tell(meta.username,msg) end end
+ local function tell(msg)
+ if meta.username then
+ if not pcall(chatbox.tell,meta.username,msg) then
+ print("chatbox error, couldn't tell "..meta.username..": "..msg)
+ end
+ end
+ end
local function refund() if meta['return'] then sendws { type="make_transaction", to=meta['return'], amount=tr.value } end end
local mtn = tr.sent_metaname