summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Bratch <luke@bratch.co.uk>2024-03-31 02:21:10 +0100
committerLuke Bratch <luke@bratch.co.uk>2024-03-31 02:21:10 +0100
commit40447ede689b5ea75f1c1f7bf6345eecd4699b0a (patch)
tree5834d69713dece459af8361f79d763dcb89a28c8
parentf4f875c5ab8c2e74ffa4af1cdc7a43050714ed42 (diff)
Include nicks in stdin debug command listchannels.
-rw-r--r--blabouncer.c11
1 files 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");