diff options
author | Hubert Hirtz <hubert@hirtzfr.eu> | 2020-08-05 22:04:50 +0200 |
---|---|---|
committer | Hubert Hirtz <hubert@hirtzfr.eu> | 2020-08-05 22:04:50 +0200 |
commit | e56baed4fc8f53047cbe216347d57171001e0a6e (patch) | |
tree | 641a3f84fe824681842407801608993b892a0fa1 /cmd | |
parent | Don't request history of the home buffer (diff) |
Add a -debug flag and show raw messages
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/irc/main.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cmd/irc/main.go b/cmd/irc/main.go index cd9c263..fab5bc5 100644 --- a/cmd/irc/main.go +++ b/cmd/irc/main.go @@ -19,7 +19,9 @@ func main() { tcell.SetEncodingFallback(tcell.EncodingFallbackASCII) var configPath string + var debug bool flag.StringVar(&configPath, "config", "", "path to the configuration file") + flag.BoolVar(&debug, "debug", false, "show raw protocol data in the home buffer") flag.Parse() if configPath == "" { @@ -35,6 +37,8 @@ func main() { log.Panicln(err) } + cfg.Debug = cfg.Debug || debug + app, err := senpai.NewApp(cfg) if err != nil { log.Panicln(err) |