diff options
| author | Nakidai <nakidai@disroot.org> | 2026-02-01 18:29:05 +0300 |
|---|---|---|
| committer | Nakidai <nakidai@disroot.org> | 2026-02-01 18:29:05 +0300 |
| commit | 32e81cb7a0d4f4b1b24674439e5a948b39725f2e (patch) | |
| tree | fbe8e667aea338c6eea2b09e4c8c27bee6819685 | |
| parent | f47f9d10f8aa3ace1f2d93d0aa6ab090f782328b (diff) | |
| download | libreircd-32e81cb7a0d4f4b1b24674439e5a948b39725f2e.tar.gz libreircd-32e81cb7a0d4f4b1b24674439e5a948b39725f2e.zip | |
Add exiting from a channel in user_remove
I think it should guarantee that nothing will break, including chanels
| -rw-r--r-- | user.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/user.c b/user.c index f2572a9..84c6584 100644 --- a/user.c +++ b/user.c @@ -86,6 +86,9 @@ user_remove(size_t pid) { size_t i, j; + for (i = 0; i < peers[pid].channels_c; ++i) + channel_exit(peers[pid].channels[i], &peers[pid]); + for (i = 0; i < peers[peers_c-1].channels_c; ++i) { for (j = 0; j < peers[peers_c-1].channels[i]->users_c; ++j) |