INNER CODE UNIT · Go
Spawn
instead-hub/instead · src/tiny/ifbot/ifbot/server.go:152
func Spawn(id int64) (*Instance, string) {
msg := ""
ctx := Lookup(id)
if ctx != nil {
return ctx, msg
}
if len(servers) >= 16 {
Cleanup()
if len(servers) >= 16 {
Kill()
}
if len(servers) >= 16 {
return nil, "Server full"
}
}
ctx = new(Instance)