about summary refs log tree commit diff
path: root/writef.c
diff options
context:
space:
mode:
Diffstat (limited to 'writef.c')
-rw-r--r--writef.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/writef.c b/writef.c
index c7baa0a..c5e6b95 100644
--- a/writef.c
+++ b/writef.c
@@ -76,6 +76,12 @@ announce(struct Peer *peer, const char *fmt, ...)
 	vstoref(fmt, args);
 	va_end(args);
 
+	if (!peer->channels_c)
+	{
+		write(peer->fd, buf, written);
+		return;
+	}
+
 	for (i = 0; i < peer->channels_c; ++i)
 		for (j = 0; j < peer->channels[i]->users_c; ++j)
 			peer->channels[i]->users[j]->flags |= ANNOUNCE;