Esempio n. 1
0
func main() {
	flag.Parse()
	fmt.Println(` _______  _______  _______           _______           .-.        .-.           
(  ____ \(  ___  )(  ____ \|\     /|(  ____ \          : :        : :           
| (    \/| (   ) || (    \/| )   ( || (    \/    .--.  : :  .---. : -..  .--.   
| |      | |   | || (__    | |   | || (_____    ; .; ; : :_ :  .; : .. :' .; ;  
| | ____ | |   | ||  __)   | |   | |(_____  )   .__,_; .___;:._.' :_;:_;.__,_; 
| | \_  )| |   | || (      | |   | |      ) |    Blackrush  : :  LOGIN                
| (___) || (___) || )      | (___) |/\____) |               :_;                 
(_______)(_______)|/       (_______)\_______) 
`)
	cfg := load_config()

	database := db.Open(&cfg.Database)
	defer database.Close()

	users := &logindb.Users{database}
	if err := users.ResetCurrentRealm(); err != nil {
		panic(err)
	}

	bnet := bnetwork.New(users, cfg.Backend)

	go bnet.Start()
	defer bnet.Stop()

	fnet := fnetwork.New(users, bnet, cfg.Frontend)

	go fnet.Start()
	defer fnet.Stop()

	<-wait_user_input()
}
Esempio n. 2
0
File: main.go Progetto: Novior/gofus
func main() {
	flag.Parse()
	fmt.Println(` _______  _______  _______           _______           .-.        .-.           
(  ____ \(  ___  )(  ____ \|\     /|(  ____ \          : :        : :           
| (    \/| (   ) || (    \/| )   ( || (    \/    .--.  : :  .---. : -..  .--.   
| |      | |   | || (__    | |   | || (_____    ; .; ; : :_ :  .; : .. :' .; ;  
| | ____ | |   | ||  __)   | |   | |(_____  )   .__,_; .___;:._.' :_;:_;.__,_; 
| | \_  )| |   | || (      | |   | |      ) |    Blackrush  : :  REALM               
| (___) || (___) || )      | (___) |/\____) |               :_;                 
(_______)(_______)|/       (_______)\_______) 
`)
	cfg := load_config()

	database := db.Open(&cfg.Database)
	defer database.Close()

	players := realmdb.NewPlayers(database)

	bnet := bnetwork.New(players, cfg.Backend)

	go bnet.Start()
	defer bnet.Stop()

	fnet := fnetwork.New(bnet, players, cfg.Frontend)

	go fnet.Start()
	defer fnet.Stop()

	<-wait_for_input()
}