From 0a876d27cab179928f6392fd14b453bf30829c51 Mon Sep 17 00:00:00 2001 From: June McEnroe Date: Sun, 5 Feb 2023 20:03:30 -0500 Subject: Fix what went wrong, part 3 --- command.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'command.c') diff --git a/command.c b/command.c index ea7400a..b09b342 100644 --- a/command.c +++ b/command.c @@ -226,16 +226,16 @@ static void commandOps(uint id, char *params) { idColors[id], idNames[id] ); bool first = true; - //struct Cursor curs = {0}; - //for (const char *nick; (nick = cacheNextKey(&curs, id));) { - // char prefix = bitPrefix(curs.entry->prefixBits); - // if (!prefix || prefix == '+') continue; - // ptr = seprintf( - // ptr, end, "%s\3%02d%c%s\3", - // (first ? "" : ", "), curs.entry->color, prefix, nick - // ); - // first = false; - //} + struct Cursor curs = {0}; + for (const char *nick; (nick = completeEach(&curs, id));) { + char prefix = bitPrefix(*completeBits(id, nick)); + if (!prefix || prefix == '+') continue; + ptr = seprintf( + ptr, end, "%s\3%02d%c%s\3", + (first ? "" : ", "), completeColor(id, nick), prefix, nick + ); + first = false; + } if (first) { uiFormat( id, Warm, NULL, "\3%02d%s\3 is a lawless wasteland", -- cgit 1.4.1