Added -V (show version) flag.

This commit is contained in:
urosj 2017-07-25 21:47:05 +02:00
parent 1bcf7f8138
commit 943fe01240

View File

@ -499,8 +499,14 @@ func main() {
deleteAutoResponsePtr := flag.String("D", "", "Delete autoresponse")
instructionsPtr := flag.Bool("i", false, "Setup instructions")
responseRatePtr := flag.Uint("t", 86400, "Response rate in seconds (0 - send each time)")
showVersion := flag.Bool("V", false, "Show version and exit")
flag.Parse()
if *showVersion {
fmt.Printf("autoresponder %v, written by Uros Juvan <asmpro@gmail.com> 2017\n", VERSION)
os.Exit(0)
}
DebugSyslogFmt("Flags: Recipient: %v, Sender: %v, SASL authenticated username: %v, Client IP: %v, Enable autoresponse: %v, Disable autoresponse: %v, Enable existing autoresponse: %v, Delete autoresponse: %v, Setup instructions: %v, Response rate: %v",
*recipientPtr,
*senderPtr,