summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--blabouncer.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/blabouncer.c b/blabouncer.c
index 41e0a47..7d2ea31 100644
--- a/blabouncer.c
+++ b/blabouncer.c
@@ -1259,6 +1259,17 @@ void dochat(int *serversockfd, int *clientsockfd, struct settings *settings) {
}
printf("Found channel '%s'.\n", channels[i].name);
+ // Store count of names so we can increment it in the loop if we encounter gaps in the names array
+ int namescount = getchannelnamescount(channels, channels[i].name);
+ // Go through each name...
+ for (int j = 0; j < namescount; j++) {
+ if (!channels[i].nicks[j][0]) {
+ // Skip this one and increment namescount so we find it later on instead
+ namescount++;
+ continue;
+ }
+ printf(" --> '%s' '%s' '%s'.\n", channels[i].namestype, channels[i].name, channels[i].nicks[j]);
+ }
}
printf("STDIN command complete: listchannels\n");