<commit_before>package main

import (
	"fmt"
	"github.com/HearthSim/stove/bnet"
	"github.com/HearthSim/stove/pegasus"
)

const (
	CONN_HOST = "localhost"
	CONN_PORT = 1119
)

func main() {
	serv := bnet.NewServer()
	serv.RegisterGameServer("WTCG", pegasus.NewServer(serv))

	addr := fmt.Sprintf("%s:%d", CONN_HOST, CONN_PORT)
	fmt.Printf("Listening on %s ...\n", addr)
	serv.ListenAndServe(addr)
}<commit_msg>Optionally get the bind address from the command line<commit_after>package main

import (
	"flag"
	"strings"
	"fmt"
	"github.com/HearthSim/stove/bnet"
	"github.com/HearthSim/stove/pegasus"
)

const (
	CONN_DEFAULT_HOST = "localhost"
	CONN_DEFAULT_PORT = 1119
)

func main() {
	addr := fmt.Sprintf("%s:%d", CONN_DEFAULT_HOST, CONN_DEFAULT_PORT)
	flag.StringVar(&addr, "bind", addr, "The address to run on")
	flag.Parse()

	if !strings.Contains(addr, ":") {
		addr = fmt.Sprintf("%s:%d", addr, CONN_DEFAULT_PORT)
	}

	serv := bnet.NewServer()
	serv.RegisterGameServer("WTCG", pegasus.NewServer(serv))

	fmt.Printf("Listening on %s ...\n", addr)
	serv.ListenAndServe(addr)
}
{'fraction_non_alphanumeric': 0.1638888888888889, 'fraction_numerical': 0.007407407407407408, 'mean_word_length': 5.0055555555555555, 'pattern_counts': {'":': 1, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6354559', 'n_tokens_mistral': 447, 'n_tokens_neox': 430, 'n_words': 79}