3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-10 22:19:31 +01:00

fix mandatory argument handling

This commit is contained in:
Edmund Huber 2014-03-15 20:47:05 +01:00
parent 7db4347419
commit 71f6562ecc

View File

@ -64,7 +64,7 @@ func main() {
irc.UpgradeDB(config.Server.Database) irc.UpgradeDB(config.Server.Database)
log.Println("database upgraded: ", config.Server.Database) log.Println("database upgraded: ", config.Server.Database)
default: case "run":
runFlags.Parse(flag.Args()[1:]) runFlags.Parse(flag.Args()[1:])
config := loadConfig(conf) config := loadConfig(conf)
irc.Log.SetLevel(config.Server.Log) irc.Log.SetLevel(config.Server.Log)
@ -72,5 +72,8 @@ func main() {
log.Println(irc.SEM_VER, "running") log.Println(irc.SEM_VER, "running")
defer log.Println(irc.SEM_VER, "exiting") defer log.Println(irc.SEM_VER, "exiting")
server.Run() server.Run()
default:
usage()
} }
} }