From 33de2d046acfc7ee42fb71b1804b091f671b098a Mon Sep 17 00:00:00 2001 From: rodri Date: Wed, 20 Sep 2023 13:15:48 +0000 Subject: more work on the menulist of matches. --- btsd.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'btsd.c') diff --git a/btsd.c b/btsd.c index c2a18bf..b2f9196 100644 --- a/btsd.c +++ b/btsd.c @@ -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); -- cgit v1.2.3