diff options
author | rodri <rgl@antares-labs.eu> | 2023-09-20 13:15:48 +0000 |
---|---|---|
committer | rodri <rgl@antares-labs.eu> | 2023-09-20 13:15:48 +0000 |
commit | 33de2d046acfc7ee42fb71b1804b091f671b098a (patch) | |
tree | 3c19b6a12cf861050701f004c5bad76877eac10e /btsd.c | |
parent | a99916512365d68d130c7dfdb3f7ac5e2e0bbe8a (diff) | |
download | battleship-33de2d046acfc7ee42fb71b1804b091f671b098a.tar.gz battleship-33de2d046acfc7ee42fb71b1804b091f671b098a.tar.bz2 battleship-33de2d046acfc7ee42fb71b1804b091f671b098a.zip |
more work on the menulist of matches.
Diffstat (limited to 'btsd.c')
-rw-r--r-- | btsd.c | 12 |
1 files changed, 4 insertions, 8 deletions
@@ -234,14 +234,10 @@ playerproc(void *arg) sendp(playerq, my); else if(nf == 1 && strcmp(f[0], "watch") == 0){ rlock(&theaterlk); - if(theater.next == &theater) - chanprint(my->io.out, "no matches\n"); - else{ - chanprint(my->io.out, "matches\n"); - for(m = theater.next; m != &theater; m = m->next) - chanprint(my->io.out, "%d %s %s\n", m->id, m->pl[0]->name, m->pl[1]->name); - chanprint(my->io.out, "end\n"); - } + chanprint(my->io.out, "matches\n"); + for(m = theater.next; m != &theater; m = m->next) + chanprint(my->io.out, "%d %s %s\n", m->id, m->pl[0]->name, m->pl[1]->name); + chanprint(my->io.out, "end\n"); runlock(&theaterlk); }else if(nf == 2 && strcmp(f[0], "watch") == 0){ mid = strtoul(f[1], nil, 10); |