Initial commit.
authorplugd <plugd@thelambdalab.xyz>
Fri, 2 Aug 2024 01:41:57 +0000 (03:41 +0200)
committerplugd <plugd@thelambdalab.xyz>
Fri, 2 Aug 2024 01:41:57 +0000 (03:41 +0200)
obbs [new file with mode: 0755]

diff --git a/obbs b/obbs
new file mode 100755 (executable)
index 0000000..97473d7
--- /dev/null
+++ b/obbs
@@ -0,0 +1,52 @@
+#!/usr/bin/env lua
+
+local usage = [[Usage: obbs [-c config_file] COMMAND [arguments ...]
+
+Here COMMAND is one of:
+  newcfg
+  init
+
+You can also use the -c option to specify an alternative configuration
+file.  (The default is the file "config.lua" in the current directory.)]]
+
+local cmd = {}
+function cmd.newcfg ()
+   print [[
+--- OBBS Configuration File
+
+obbs.name = "My OBBS Name"
+obbs.sysop = "Sysop Name"
+
+obbs.conferences = {
+   "Announcements",
+   "General",
+   "Meta"
+}
+]]
+
+end
+
+local conf = {}
+local function load_config (file)
+
+   loadfile(file)
+
+end
+
+
+-- Main
+
+local function main()
+   if #arg < 1 then
+      print(usage)
+   else
+      if cmd[arg[1]] then
+         cmd[arg[1]]()
+      else
+         print("Unknown command '" .. arg[1] .. "'")
+         print(usage)
+      end
+   end
+end
+
+main()