summaryrefslogtreecommitdiff
path: root/internal/server
diff options
context:
space:
mode:
authorPaul Buetow <git@mx.buetow.org>2020-12-26 11:44:31 +0000
committerPaul Buetow <git@mx.buetow.org>2020-12-26 11:44:31 +0000
commit60fa324cd5296b088c24d8db1d334a25ca955788 (patch)
tree88c14b39b66f5273cebf96307c86293b178cce40 /internal/server
parentab676c2b484225ed22765b23d8f0545088ecd610 (diff)
initial spartan mode support
Diffstat (limited to 'internal/server')
-rw-r--r--internal/server/handlers/serverhandler.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/internal/server/handlers/serverhandler.go b/internal/server/handlers/serverhandler.go
index 3d1a53d..5b948b3 100644
--- a/internal/server/handlers/serverhandler.go
+++ b/internal/server/handlers/serverhandler.go
@@ -43,6 +43,7 @@ type ServerHandler struct {
ackCloseReceived chan struct{}
activeCommands int32
activeReaders int32
+ spartan bool
}
// NewServerHandler returns the server handler.
@@ -245,6 +246,12 @@ func (h *ServerHandler) handleUserCommand(ctx context.Context, argc int, args []
commandFinished()
return
}
+ if spartan, ok := options["spartan"]; ok {
+ if spartan == "true" {
+ logger.Debug(h.user, "Enabling spartan mode")
+ h.spartan = true
+ }
+ }
switch commandName {
case "grep", "cat":