diff options
author | June McEnroe <june@causal.agency> | 2023-02-05 20:03:30 -0500 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2023-02-05 20:03:30 -0500 |
commit | 0a876d27cab179928f6392fd14b453bf30829c51 (patch) | |
tree | fa61ae03449ebd3e3ca0980ad760c2c59a1647cc /command.c | |
parent | Fix what went wrong, part 2 (diff) | |
download | catgirl-0a876d27cab179928f6392fd14b453bf30829c51.tar.gz catgirl-0a876d27cab179928f6392fd14b453bf30829c51.zip |
Fix what went wrong, part 3
Diffstat (limited to '')
-rw-r--r-- | command.c | 20 |
1 files changed, 10 insertions, 10 deletions
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", |