package main

import (
  "flag"
  "log"
  "runtime"

  "github.com/fimad/ggircd/irc"
)

var configFile = flag.String("config", "/etc/ggircd.conf",
  "Path to a file containing the irc daemon's configuration.")

func main() {
  runtime.GOMAXPROCS(runtime.NumCPU())

  flag.Parse()
  log.SetFlags(log.Ldate | log.Ltime | log.Lshortfile)

  cfg := irc.ConfigFromJSONFile(*configFile)
  server := irc.NewDispatcher(cfg)
  server.Loop()
}

package main

import (
  "flag"
  "log"

  "github.com/fimad/ggircd/irc"
)

var configFile = flag.String("config", "/etc/ggircd.conf",
  "Path to a file containing the irc daemon's configuration.")

func main() {
  flag.Parse()
  log.SetFlags(log.Ldate | log.Ltime | log.Lshortfile)

  cfg := irc.ConfigFromJSONFile(*configFile)
  server := irc.NewDispatcher(cfg)
  server.Loop()
}

--- 
+++ 
@@ -3,6 +3,7 @@
 import (
   "flag"
   "log"
+  "runtime"
 
   "github.com/fimad/ggircd/irc"
 )
@@ -11,6 +12,8 @@
   "Path to a file containing the irc daemon's configuration.")
 
 func main() {
+  runtime.GOMAXPROCS(runtime.NumCPU())
+
   flag.Parse()
   log.SetFlags(log.Ldate | log.Ltime | log.Lshortfile)
 
Set max procs to num cpus.
