From 40447ede689b5ea75f1c1f7bf6345eecd4699b0a Mon Sep 17 00:00:00 2001 From: Luke Bratch Date: Sun, 31 Mar 2024 02:21:10 +0100 Subject: Include nicks in stdin debug command listchannels. --- blabouncer.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/blabouncer.c b/blabouncer.c index c3443dd..917ef74 100644 --- a/blabouncer.c +++ b/blabouncer.c @@ -753,12 +753,19 @@ void dochat(int *serversockfd, int *clientsockfd, struct settings *settings) { debugprint(DEBUG_FULL, "dochat(): stdin: Checking channel[%d] out of %d.\n", i, channelcount); // Skip this one if it's a blank channel if (!channels[i].name[0]) { - debugprint(DEBUG_FULL, "dochat(): stdin: Skipping blank channel channel[%d].\n", i); - continue; + debugprint(DEBUG_FULL, "dochat(): stdin: Skipping blank channel channel[%d].\n", i); + continue; } debugprint(DEBUG_FULL, "dochat(): stdin: Found channel '%s'.\n", channels[i].name); printf("Found channel '%s'.\n", channels[i].name); + + for (int j = 0; j < MAXCHANNICKS; j++) { + if (channels[i].nicks[j][0]) { + debugprint(DEBUG_FULL, "dochat(): stdin: channel[%d].nick[%d]: '%s': '%s'.\n", i, j, channels[i].name, channels[i].nicks[j]); + printf("channel[%d].nick[%d]: '%s': '%s'.\n", i, j, channels[i].name, channels[i].nicks[j]); + } + } } debugprint(DEBUG_SOME, "dochat(): stdin: STDIN command complete: listchannels\n"); -- cgit v1.2.3