@@ 18,6 18,7 @@ var black string
var turn chess.Color
var drawProposed bool
+// TODO: runtime configuration
const server = "d2evs.net"
const port = 6696
const name = "quaternia"
@@ 28,6 29,8 @@ func paste() (string, error) {
state := game.Position().Board().Draw() + "\n\n# PGN\n\n" + game.String() +
"\n\n# FEN\n\n" + game.FEN()
name := strconv.Itoa(int(crc32.ChecksumIEEE([]byte(state)))) + ".txt"
+ // XXX: Consider supporting user-specified paste commands (upload text
+ // goes into stdin, paste URL comes out of stdout)
f, err := os.Create(path + name)
if err != nil {
return "", err
@@ 36,6 39,7 @@ func paste() (string, error) {
return urlpfx + name, nil
}
+// TODO: UCI
func onmsg(c *girc.Client, e girc.Event) {
cmd := strings.Split(e.Last(), " ")
if len(cmd) == 1 && game != nil {
@@ 173,6 177,7 @@ func main() {
SASL: sasl,
})
client.Handlers.Add(girc.CONNECTED, func(c *girc.Client, e girc.Event) {
+ // TODO: join user-specified channels
fmt.Println("connected")
c.Handlers.Add(girc.PRIVMSG, onmsg)
})