diff --git a/include/c/motes.h b/include/c/motes.h index 8cb2dbbc7d..6d5dadf760 100644 --- a/include/c/motes.h +++ b/include/c/motes.h @@ -278,6 +278,7 @@ # define c3__ctl c3_s3('c','t','l') # define c3__cut c3_s3('c','u','t') # 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__da c3_s2('d','a') # define c3__dago c3_s4('d','a','g','o') diff --git a/vere/ames.c b/vere/ames.c index b04d64ecda..913c856164 100644 --- a/vere/ames.c +++ b/vere/ames.c @@ -394,28 +394,24 @@ _ames_io_start() { u3_ames* sam_u = &u3_Host.sam_u; 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 ( 0 != u3_Host.ops_u.imp_c ) { - u3_noun imp = u3i_string(u3_Host.ops_u.imp_c); - u3_noun num = u3dc("slaw", 'p', imp); - c3_y num_y; + if ( c3__czar == rac ) { + u3_noun imp = u3dc("scot", 'p', u3k(u3A->own)); + c3_c* imp_c = u3r_string(imp); + c3_y num_y = u3r_byte(0, u3A->own); - 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); 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 { - uL(fprintf(uH, "ames: czar: %s on %d (localhost only)\n", - u3_Host.ops_u.imp_c, por_s)); + uL(fprintf(uH, "ames: czar: %s on %d (localhost only)\n", imp_c, por_s)); } - u3z(num); + + u3z(imp); + free(imp_c); } int ret; @@ -458,6 +454,7 @@ _ames_io_start() uv_udp_recv_start(&sam_u->wax_u, _ames_alloc, _ames_recv_cb); sam_u->liv = c3y; + u3z(rac); } /* _cttp_mcut_char(): measure/cut character. diff --git a/vere/loop.c b/vere/loop.c index cac36d6ffc..ac830936e2 100644 --- a/vere/loop.c +++ b/vere/loop.c @@ -670,8 +670,14 @@ u3_lo_lead(void) u3_ames_ef_bake(); u3_http_ef_bake(); - if ( (c3y == u3_Host.ops_u.nuu) && (0 != u3_Host.ops_u.imp_c) ) { - u3_unix_ef_initial_into(); + if ( c3y == u3_Host.ops_u.nuu ) { + u3_noun rac = u3do("clan:title", u3k(u3A->own)); + + if ( c3__czar == rac ) { + u3_unix_ef_initial_into(); + } + + u3z(rac); } }