From 63c0a8860459c0c9bf3b66d4d4ec631ece4bf56e Mon Sep 17 00:00:00 2001 From: Nakidai Date: Wed, 7 Jan 2026 00:26:37 +0300 Subject: Fix user quit When user A leaves, last user in the peer list B is copied into the space left by leaving A. But, besides that it also important to not forget that there can be channels containing B: they store a link to every user belonging. So, it's important to adjust all links to B iterating every channel B belongs to. --- ircd.h | 1 + 1 file changed, 1 insertion(+) (limited to 'ircd.h') diff --git a/ircd.h b/ircd.h index 8097c26..07bdd0f 100644 --- a/ircd.h +++ b/ircd.h @@ -75,6 +75,7 @@ extern int port; const char *getnick(const struct Peer *peer); void user_reg(struct Peer *peer, const char *nick, const char *user, const char *real); +void user_remove(size_t pid); int channel_join(struct Channel *channel, struct Peer *peer); int channel_exit(struct Channel *channel, struct Peer *peer); -- cgit 1.4.1