From e0e5c742e3fe61429b4e329021809dac822573e8 Mon Sep 17 00:00:00 2001 From: "." <.@.> Date: Sat, 27 Aug 2016 14:20:27 +1200 Subject: [PATCH] add -version option to display version and quit --HG-- branch : nmdc-ircfrontend --- main.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/main.go b/main.go index acfd3e6..30d91f3 100644 --- a/main.go +++ b/main.go @@ -33,9 +33,15 @@ func main() { hubsec := flag.String("hubsecurity", "Hub-Security", "Nick used for administrative events") verbose := flag.Bool("verbose", false, "Display debugging information") autojoin := flag.Bool("autojoin", true, "Automatically join clients to the channel") + version := flag.Bool("version", false, "Display version and exit") flag.Parse() + if *version { + log.Printf("%s version %s\n", APP_NAME, APP_VERSION) + return + } + log.Printf("Listening on '%s'...", *ircAddress) if *autojoin { log.Printf("Clients will be automatically joined to the channel.")