From 363617fbf10c4267c9fa775d6928fe7dce37ffb7 Mon Sep 17 00:00:00 2001 From: Austen Adler Date: Sat, 7 Jan 2017 17:44:30 +0000 Subject: [PATCH] apperantly we;re using git now --- action.lua | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 action.lua diff --git a/action.lua b/action.lua new file mode 100644 index 0000000..329264c --- /dev/null +++ b/action.lua @@ -0,0 +1,31 @@ +function on_msg_receive (msg) + if msg.out then + return + end + if ((msg.text=='/purple') or (msg.text=='/p')) then + local file = io.open("/home/pi/git/lights/tglog.txt", "w") + local timestr = os.date("%Y/%m/%d-%H:%M:%S") + local message = ("purple|" .. timestr .. "|") + send_msg (msg.from.print_name, message, ok_cb, false) + file:write("purple|", timestr, "\n") + file:close() + end +end + +function on_our_id (id) +end + +function on_secret_chat_created (peer) +end + +function on_user_update (user) +end + +function on_chat_update (user) +end + +function on_get_difference_end () +end + +function on_binlog_replay_end () +end