diff options
| author | Nakidai Perumenei <nakidai@disroot.org> | 2026-12-02 20:56:34 +0300 |
|---|---|---|
| committer | Nakidai <nakidai@disroot.org> | 2026-01-30 15:32:45 +0300 |
| commit | aff812928c99bdc92184626a7ce111e442b2dfb6 (patch) | |
| tree | 6c997cc0d9e0f4aa05d595e42ee48715b74381bd /writef.c | |
| parent | 0e426a3395a95f08b47bdad512a0eaabbc5701d4 (diff) | |
| download | libreircd-aff812928c99bdc92184626a7ce111e442b2dfb6.tar.gz libreircd-aff812928c99bdc92184626a7ce111e442b2dfb6.zip | |
Add self announcing
If user hasn't joined any channels, announcement still should be delivered to them
Diffstat (limited to 'writef.c')
| -rw-r--r-- | writef.c | 6 |
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; |