habbgo/main.go

34 lines
759 B
Go
Raw Permalink Normal View History

2019-11-27 07:28:20 +00:00
package main
import (
2022-01-09 00:27:19 +00:00
"github.com/rs/zerolog"
2022-01-08 14:35:12 +00:00
2022-01-09 00:05:39 +00:00
"github.com/yunginnanet/habbgo/config"
"github.com/yunginnanet/habbgo/server"
2019-11-27 07:28:20 +00:00
)
2022-01-09 00:27:19 +00:00
var log zerolog.Logger
2022-01-09 00:27:19 +00:00
func init() {
config.LoadConfig()
log = config.StartLogger()
}
func main() {
log.Info().Msg("Booting up BobbaGo...")
log.Info().Str("caller", config.Filename).Msg("Loaded config file...")
2022-01-09 00:27:19 +00:00
// TODO: replace with bitcask database
// log.Println("Attempting to make connection with the database... ")
// host := fmt.Sprintf("%v:%v@tcp(%v:%v)/%v", c.DB.User, c.DB.Password, c.DB.Host, c.DB.Port, c.DB.Name)
2021-09-09 02:14:06 +00:00
2022-01-09 00:27:19 +00:00
log.Info().Str("caller", config.HabboBind).Int("port", config.HabboPort).
Msg("Starting the game server... ")
2021-09-09 02:14:06 +00:00
2021-09-19 03:24:51 +00:00
gameServer := server.New()
2019-11-27 07:28:20 +00:00
gameServer.Start()
2019-11-27 07:28:20 +00:00
defer gameServer.Stop()
}