use +clan:title to detect galaxy

This commit is contained in:
Joe Bryan 2018-10-09 23:44:00 -04:00
parent 6e77aa110a
commit 5207c8321f
3 changed files with 20 additions and 16 deletions

View File

@ -278,6 +278,7 @@
# define c3__ctl c3_s3('c','t','l') # define c3__ctl c3_s3('c','t','l')
# define c3__cut c3_s3('c','u','t') # define c3__cut c3_s3('c','u','t')
# define c3__cyl c3_s3('c','y','l') # define c3__cyl c3_s3('c','y','l')
# define c3__czar c3_s4('c','z','a','r')
# define c3__d c3_s1('d') # define c3__d c3_s1('d')
# define c3__da c3_s2('d','a') # define c3__da c3_s2('d','a')
# define c3__dago c3_s4('d','a','g','o') # define c3__dago c3_s4('d','a','g','o')

View File

@ -394,28 +394,24 @@ _ames_io_start()
{ {
u3_ames* sam_u = &u3_Host.sam_u; u3_ames* sam_u = &u3_Host.sam_u;
c3_s por_s = u3_Host.ops_u.por_s; c3_s por_s = u3_Host.ops_u.por_s;
u3_noun rac = u3do("clan:title", u3k(u3A->own));
// XX use clan:title u3A->own if ( c3__czar == rac ) {
if ( 0 != u3_Host.ops_u.imp_c ) { u3_noun imp = u3dc("scot", 'p', u3k(u3A->own));
u3_noun imp = u3i_string(u3_Host.ops_u.imp_c); c3_c* imp_c = u3r_string(imp);
u3_noun num = u3dc("slaw", 'p', imp); c3_y num_y = u3r_byte(0, u3A->own);
c3_y num_y;
if ( c3n == u3du(num) ) {
uL(fprintf(uH, "malformed emperor: %s\n", u3_Host.ops_u.imp_c));
exit(1);
}
num_y = u3r_byte(0, u3t(num));
por_s = _ames_czar_port(num_y); por_s = _ames_czar_port(num_y);
if ( c3y == u3_Host.ops_u.net ) { if ( c3y == u3_Host.ops_u.net ) {
uL(fprintf(uH, "ames: czar: %s on %d\n", u3_Host.ops_u.imp_c, por_s)); uL(fprintf(uH, "ames: czar: %s on %d\n", imp_c, por_s));
} }
else { else {
uL(fprintf(uH, "ames: czar: %s on %d (localhost only)\n", uL(fprintf(uH, "ames: czar: %s on %d (localhost only)\n", imp_c, por_s));
u3_Host.ops_u.imp_c, por_s));
} }
u3z(num);
u3z(imp);
free(imp_c);
} }
int ret; int ret;
@ -458,6 +454,7 @@ _ames_io_start()
uv_udp_recv_start(&sam_u->wax_u, _ames_alloc, _ames_recv_cb); uv_udp_recv_start(&sam_u->wax_u, _ames_alloc, _ames_recv_cb);
sam_u->liv = c3y; sam_u->liv = c3y;
u3z(rac);
} }
/* _cttp_mcut_char(): measure/cut character. /* _cttp_mcut_char(): measure/cut character.

View File

@ -670,8 +670,14 @@ u3_lo_lead(void)
u3_ames_ef_bake(); u3_ames_ef_bake();
u3_http_ef_bake(); u3_http_ef_bake();
if ( (c3y == u3_Host.ops_u.nuu) && (0 != u3_Host.ops_u.imp_c) ) { if ( c3y == u3_Host.ops_u.nuu ) {
u3_unix_ef_initial_into(); u3_noun rac = u3do("clan:title", u3k(u3A->own));
if ( c3__czar == rac ) {
u3_unix_ef_initial_into();
}
u3z(rac);
} }
} }