summaryrefslogtreecommitdiff
path: root/config.go
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--config.go17
1 files changed, 11 insertions, 6 deletions
diff --git a/config.go b/config.go
index 216655a..09f4b39 100644
--- a/config.go
+++ b/config.go
@@ -7,18 +7,23 @@ import (
)
type Config struct {
- Addr string
- Nick string
- Real string
- User string
- Password *string
- Highlights []string
+ Addr string
+ Nick string
+ Real string
+ User string
+ Password *string
+
+ Highlights []string
+ NickColWidth int `yaml:"nick-column-width"`
Debug bool
}
func ParseConfig(buf []byte) (cfg Config, err error) {
err = yaml.Unmarshal(buf, &cfg)
+ if cfg.NickColWidth <= 0 {
+ cfg.NickColWidth = 16
+ }
return
}