X-Git-Url: http://www.git.cypherpunks.ru/?p=goircd.git;a=blobdiff_plain;f=goircd.go;h=13efe2c9c5cca7dc790e522cb7bb17032b493bd6;hp=b0f5e07716db40625c08378d046670c9154c68d8;hb=990937d451208b0299246c46dd29adf7a35f97ee;hpb=85e6538f2f610ad66bf0be0eff5bdcf05f1b8e3c diff --git a/goircd.go b/goircd.go index b0f5e07..13efe2c 100644 --- a/goircd.go +++ b/goircd.go @@ -23,12 +23,9 @@ import ( "io/ioutil" "log" "net" - "os" - "os/signal" "path" "path/filepath" "strings" - "syscall" ) var ( @@ -53,7 +50,7 @@ func listenerLoop(sock net.Listener, events chan<- ClientEvent) { log.Println("Error during accepting connection", err) continue } - client := NewClient(*hostname, conn) + client := NewClient(hostname, conn) go client.Processor(events) } } @@ -79,9 +76,9 @@ func Run() { } stateSink := make(chan StateEvent) - daemon := NewDaemon(version, *hostname, *motd, logSink, stateSink) + daemon := NewDaemon(version, hostname, motd, passwords, logSink, stateSink) daemon.Verbose = *verbose - log.Println("goircd "+daemon.version+" is starting") + log.Println("goircd " + daemon.version + " is starting") if *statedir == "" { // Dummy statekeeper go func() { @@ -115,19 +112,6 @@ func Run() { log.Println(*statedir, "statekeeper initialized") } - if *passwords != "" { - daemon.PasswordsRefresh() - hups := make(chan os.Signal) - signal.Notify(hups, syscall.SIGHUP) - go func() { - for { - <-hups - daemon.PasswordsRefresh() - } - }() - } - - if *bind != "" { listener, err := net.Listen("tcp", *bind) if err != nil {