summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorHubert Hirtz <hubert@hirtzfr.eu>2020-08-05 22:04:50 +0200
committerHubert Hirtz <hubert@hirtzfr.eu>2020-08-05 22:04:50 +0200
commite56baed4fc8f53047cbe216347d57171001e0a6e (patch)
tree641a3f84fe824681842407801608993b892a0fa1 /cmd
parentDon'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.go4
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)