Index: trunk/cmd/jounce/main.go
===================================================================
--- trunk/cmd/jounce/main.go	(revision 84)
+++ 	(revision )
@@ -1,73 +1,0 @@
-package main
-
-import (
-	"crypto/tls"
-	"flag"
-	"log"
-	"net"
-
-	"git.sr.ht/~emersion/jounce"
-	"git.sr.ht/~emersion/jounce/config"
-)
-
-func main() {
-	var addr, configPath string
-	var debug bool
-	flag.StringVar(&addr, "listen", "", "listening address")
-	flag.StringVar(&configPath, "config", "", "path to configuration file")
-	flag.BoolVar(&debug, "debug", false, "enable debug logging")
-	flag.Parse()
-
-	var cfg *config.Server
-	if configPath != "" {
-		var err error
-		cfg, err = config.Load(configPath)
-		if err != nil {
-			log.Fatalf("failed to load config file: %v", err)
-		}
-	} else {
-		cfg = config.Defaults()
-	}
-
-	if addr != "" {
-		cfg.Addr = addr
-	}
-
-	db, err := jounce.OpenSQLDB(cfg.SQLDriver, cfg.SQLSource)
-	if err != nil {
-		log.Fatalf("failed to open database: %v", err)
-	}
-
-	var ln net.Listener
-	if cfg.TLS != nil {
-		cert, err := tls.LoadX509KeyPair(cfg.TLS.CertPath, cfg.TLS.KeyPath)
-		if err != nil {
-			log.Fatalf("failed to load TLS certificate and key: %v", err)
-		}
-
-		tlsCfg := &tls.Config{Certificates: []tls.Certificate{cert}}
-		ln, err = tls.Listen("tcp", cfg.Addr, tlsCfg)
-		if err != nil {
-			log.Fatalf("failed to start TLS listener: %v", err)
-		}
-	} else {
-		var err error
-		ln, err = net.Listen("tcp", cfg.Addr)
-		if err != nil {
-			log.Fatalf("failed to start listener: %v", err)
-		}
-	}
-
-	srv := jounce.NewServer(db)
-	// TODO: load from config/DB
-	srv.Hostname = cfg.Hostname
-	srv.Debug = debug
-
-	log.Printf("server listening on %q", cfg.Addr)
-	go func() {
-		if err := srv.Run(); err != nil {
-			log.Fatal(err)
-		}
-	}()
-	log.Fatal(srv.Serve(ln))
-}
Index: trunk/cmd/jouncectl/main.go
===================================================================
--- trunk/cmd/jouncectl/main.go	(revision 84)
+++ 	(revision )
@@ -1,81 +1,0 @@
-package main
-
-import (
-	"flag"
-	"fmt"
-	"log"
-	"os"
-
-	"git.sr.ht/~emersion/jounce"
-	"git.sr.ht/~emersion/jounce/config"
-	"golang.org/x/crypto/bcrypt"
-	"golang.org/x/crypto/ssh/terminal"
-)
-
-const usage = `usage: jouncectl [-config path] <action> [options...]
-
-  create-user <username>  Create a new user
-  help                    Show this help message
-`
-
-func init() {
-	flag.Usage = func() {
-		fmt.Fprintf(flag.CommandLine.Output(), usage)
-	}
-}
-
-func main() {
-	var configPath string
-	flag.StringVar(&configPath, "config", "", "path to configuration file")
-	flag.Parse()
-
-	var cfg *config.Server
-	if configPath != "" {
-		var err error
-		cfg, err = config.Load(configPath)
-		if err != nil {
-			log.Fatalf("failed to load config file: %v", err)
-		}
-	} else {
-		cfg = config.Defaults()
-	}
-
-	db, err := jounce.OpenSQLDB(cfg.SQLDriver, cfg.SQLSource)
-	if err != nil {
-		log.Fatalf("failed to open database: %v", err)
-	}
-
-	switch cmd := flag.Arg(0); cmd {
-	case "create-user":
-		username := flag.Arg(1)
-		if username == "" {
-			flag.Usage()
-			os.Exit(1)
-		}
-
-		fmt.Printf("Password: ")
-		password, err := terminal.ReadPassword(int(os.Stdin.Fd()))
-		if err != nil {
-			log.Fatalf("failed to read password: %v", err)
-		}
-		fmt.Printf("\n")
-
-		hashed, err := bcrypt.GenerateFromPassword(password, bcrypt.DefaultCost)
-		if err != nil {
-			log.Fatalf("failed to hash password: %v", err)
-		}
-
-		user := jounce.User{
-			Username: username,
-			Password: string(hashed),
-		}
-		if err := db.CreateUser(&user); err != nil {
-			log.Fatalf("failed to create user: %v", err)
-		}
-	default:
-		flag.Usage()
-		if cmd != "help" {
-			os.Exit(1)
-		}
-	}
-}
Index: trunk/cmd/soju/main.go
===================================================================
--- trunk/cmd/soju/main.go	(revision 98)
+++ trunk/cmd/soju/main.go	(revision 98)
@@ -0,0 +1,73 @@
+package main
+
+import (
+	"crypto/tls"
+	"flag"
+	"log"
+	"net"
+
+	"git.sr.ht/~emersion/soju"
+	"git.sr.ht/~emersion/soju/config"
+)
+
+func main() {
+	var addr, configPath string
+	var debug bool
+	flag.StringVar(&addr, "listen", "", "listening address")
+	flag.StringVar(&configPath, "config", "", "path to configuration file")
+	flag.BoolVar(&debug, "debug", false, "enable debug logging")
+	flag.Parse()
+
+	var cfg *config.Server
+	if configPath != "" {
+		var err error
+		cfg, err = config.Load(configPath)
+		if err != nil {
+			log.Fatalf("failed to load config file: %v", err)
+		}
+	} else {
+		cfg = config.Defaults()
+	}
+
+	if addr != "" {
+		cfg.Addr = addr
+	}
+
+	db, err := soju.OpenSQLDB(cfg.SQLDriver, cfg.SQLSource)
+	if err != nil {
+		log.Fatalf("failed to open database: %v", err)
+	}
+
+	var ln net.Listener
+	if cfg.TLS != nil {
+		cert, err := tls.LoadX509KeyPair(cfg.TLS.CertPath, cfg.TLS.KeyPath)
+		if err != nil {
+			log.Fatalf("failed to load TLS certificate and key: %v", err)
+		}
+
+		tlsCfg := &tls.Config{Certificates: []tls.Certificate{cert}}
+		ln, err = tls.Listen("tcp", cfg.Addr, tlsCfg)
+		if err != nil {
+			log.Fatalf("failed to start TLS listener: %v", err)
+		}
+	} else {
+		var err error
+		ln, err = net.Listen("tcp", cfg.Addr)
+		if err != nil {
+			log.Fatalf("failed to start listener: %v", err)
+		}
+	}
+
+	srv := soju.NewServer(db)
+	// TODO: load from config/DB
+	srv.Hostname = cfg.Hostname
+	srv.Debug = debug
+
+	log.Printf("server listening on %q", cfg.Addr)
+	go func() {
+		if err := srv.Run(); err != nil {
+			log.Fatal(err)
+		}
+	}()
+	log.Fatal(srv.Serve(ln))
+}
Index: trunk/cmd/sojuctl/main.go
===================================================================
--- trunk/cmd/sojuctl/main.go	(revision 98)
+++ trunk/cmd/sojuctl/main.go	(revision 98)
@@ -0,0 +1,81 @@
+package main
+
+import (
+	"flag"
+	"fmt"
+	"log"
+	"os"
+
+	"git.sr.ht/~emersion/soju"
+	"git.sr.ht/~emersion/soju/config"
+	"golang.org/x/crypto/bcrypt"
+	"golang.org/x/crypto/ssh/terminal"
+)
+
+const usage = `usage: sojuctl [-config path] <action> [options...]
+
+  create-user <username>  Create a new user
+  help                    Show this help message
+`
+
+func init() {
+	flag.Usage = func() {
+		fmt.Fprintf(flag.CommandLine.Output(), usage)
+	}
+}
+
+func main() {
+	var configPath string
+	flag.StringVar(&configPath, "config", "", "path to configuration file")
+	flag.Parse()
+
+	var cfg *config.Server
+	if configPath != "" {
+		var err error
+		cfg, err = config.Load(configPath)
+		if err != nil {
+			log.Fatalf("failed to load config file: %v", err)
+		}
+	} else {
+		cfg = config.Defaults()
+	}
+
+	db, err := soju.OpenSQLDB(cfg.SQLDriver, cfg.SQLSource)
+	if err != nil {
+		log.Fatalf("failed to open database: %v", err)
+	}
+
+	switch cmd := flag.Arg(0); cmd {
+	case "create-user":
+		username := flag.Arg(1)
+		if username == "" {
+			flag.Usage()
+			os.Exit(1)
+		}
+
+		fmt.Printf("Password: ")
+		password, err := terminal.ReadPassword(int(os.Stdin.Fd()))
+		if err != nil {
+			log.Fatalf("failed to read password: %v", err)
+		}
+		fmt.Printf("\n")
+
+		hashed, err := bcrypt.GenerateFromPassword(password, bcrypt.DefaultCost)
+		if err != nil {
+			log.Fatalf("failed to hash password: %v", err)
+		}
+
+		user := soju.User{
+			Username: username,
+			Password: string(hashed),
+		}
+		if err := db.CreateUser(&user); err != nil {
+			log.Fatalf("failed to create user: %v", err)
+		}
+	default:
+		flag.Usage()
+		if cmd != "help" {
+			os.Exit(1)
+		}
+	}
+}
