aboutsummaryrefslogtreecommitdiff
path: root/persistence/sessions.go
diff options
context:
space:
mode:
Diffstat (limited to 'persistence/sessions.go')
-rw-r--r--persistence/sessions.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/persistence/sessions.go b/persistence/sessions.go
index cfea675..bc71fd6 100644
--- a/persistence/sessions.go
+++ b/persistence/sessions.go
@@ -38,12 +38,14 @@ type Session struct {
Timezone string `yaml:":timezone"`
KeepOnline bool `yaml:":keeponline"`
RawMessages bool `yaml:":rawmessages"`
+ AsciiArrows bool `yaml:":asciiarrows"`
}
var configKeys = []string{
"timezone",
"keeponline",
"rawmessages",
+ "asciiarrows",
}
var sessionDB *SessionsYamlDB
@@ -114,6 +116,8 @@ func (s *Session) Get(key string) (string, error) {
return fromBool(s.KeepOnline), nil
case "rawmessages":
return fromBool(s.RawMessages), nil
+ case "asciiarrows":
+ return fromBool(s.AsciiArrows), nil
}
return "", errors.New("Unknown session property")
@@ -150,6 +154,13 @@ func (s *Session) Set(key string, value string) (string, error) {
}
s.RawMessages = b
return value, nil
+ case "asciiarrows":
+ b, err := toBool(value)
+ if err != nil {
+ return "", err
+ }
+ s.AsciiArrows = b
+ return value, nil
}
return "", errors.New("Unknown session property")