aboutsummaryrefslogtreecommitdiff
path: root/telem.lua
diff options
context:
space:
mode:
authorSolderpunk <solderpunk@sdf.org>2018-12-07 20:32:55 +0000
committerSolderpunk <solderpunk@sdf.org>2018-12-07 20:32:55 +0000
commitca90a682b686c55a1d359a39f41b86ddacaee982 (patch)
tree6213f7c8280f7bb2e5a289d949b31ba50a697c06 /telem.lua
parentAdd new board support. (diff)
Add support for top-level reply command (outside of ).
Diffstat (limited to '')
-rwxr-xr-xtelem.lua16
1 files changed, 15 insertions, 1 deletions
diff --git a/telem.lua b/telem.lua
index 10f10db..8714581 100755
--- a/telem.lua
+++ b/telem.lua
@@ -286,6 +286,20 @@ function do_quit()
print("Goodbye!")
end
+function do_reply()
+ if current_board == "" then
+ print("Not at any board!")
+ return
+ end
+ print("Reply to which thread?")
+ local thread_id = string.upper(io.read())
+ thread = current_thread_index[tonumber(thread_id)]
+ current_thread_subject = thread.subject
+ current_thread_posts = get_posts(thread)
+ current_thread_index = #current_thread_posts
+ do_type_reply()
+end
+
function do_rules()
cat_file("/var/bbs/docs/rules")
end
@@ -327,7 +341,7 @@ dispatch["s"] = do_unimplemented
dispatch["="] = do_unimplemented
dispatch["M"] = do_unimplemented
dispatch["n"] = do_new
-dispatch["r"] = do_unimplemented
+dispatch["r"] = do_reply
dispatch["b"] = do_board
dispatch["c"] = do_unimplemented