<commit_before>package main

import (
	"./helpers"
	"crypto/md5"
	"encoding/json"
	"github.com/garyburd/redigo/redis"
	"strings"
)

type Space struct {
	subnet []Player
}

type Player struct {
	localIP  string
	userName string
}

func Adduser(msg string) {
	helpers.TRACE.Println("socket.io: adduser", msg)

}

func Logon(msg string) {

	var space Space

	ipNumbers := strings.Split(msg, " ")
	helpers.TRACE.Println("socket.io: Logon", ipNumbers)

	spaceID := md5.Sum([]byte(ipNumbers[1]))
	helpers.TRACE.Println("socket.io: Logon", spaceID)
	jsonSpace, err := redis.Bytes(RedisDB.Do("GET", spaceID))
	if err != nil {
		space := Space{
			subnet: []Player{
				{
					localIP:  ipNumbers[0],
					userName: "JonDoe",
				},
			},
		}
		jsonSpace, err := json.Marshal(space)
		if err != nil {
			ERROR.Println("socket.io->Logon error: ", err)
		}
		RedisDB.Do("SET", "spaceID", jsonSpace)
	}
	err = json.Unmarshal(jsonSpace, &space)
	if err != nil {
		ERROR.Println("socket.io->Logon error: ", err)
	}
	TRACE.Println("socket.io: ", space)
}<commit_msg>logon.js test<commit_after>package main

import (
	"./helpers"
	"crypto/md5"
	"strings"
)

type Space struct {
	subnet []Player
}

type Player struct {
	localIP  string
	userName string
}

func Adduser(msg string) {
	helpers.TRACE.Println("socket.io: adduser", msg)

}

func Logon(msg string) {

	ipNumbers := strings.Split(msg, " ")
	helpers.TRACE.Println("socket.io: Logon", ipNumbers)

	spaceID := md5.Sum([]byte(ipNumbers[1]))
	helpers.TRACE.Println("socket.io: Logon", spaceID)
}
{'fraction_non_alphanumeric': 0.16416938110749185, 'fraction_numerical': 0.004560260586319218, 'mean_word_length': 4.036065573770492, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '990038', 'n_tokens_mistral': 628, 'n_tokens_neox': 592, 'n_words': 118}