goirc/server.go

26 lines
446 B
Go
Raw Permalink Normal View History

package main
import (
"fmt"
"irc/server/config"
)
func main() {
2011-07-17 12:14:25 +00:00
cfg := config.NewConfig()
cfg.Ports[6667] = config.DefaultPort()
cfg.Ports[6667].Port = 6667
// cfg.Ports[6697] = &config.cPort{Port: 6697, SSL: true}
fmt.Println(cfg.String())
/*
cfg, err := config.ConfigFromFile("server.cfg")
if err != nil {
fmt.Println(err)
return
}
*/
for i, p := range cfg.Ports {
fmt.Printf("port %d\n", i)
fmt.Println(p.String())
}
}