[READ-ONLY] Mirror of https://github.com/VibeDevelopers/Comet.
0

Configure Feed

Select the types of activity you want to include in your feed.

Call the channel_lowerts hook on SJOIN too Previously this hook was called only when a remote join outside of a netjoin burst to an existing channel happens, which is a fairly odd set of criteria. By making it run for SJOIN too, it now covers every case where a channel's TS is lowered, making the hook more reliable for use.

TwinUsers (Jul 27, 2026, 12:13 AM +0100) 36cd7470 fef80ef9

+15 -11
+9 -11
doc/technical/hooks.md
··· 495 495 496 496 ### channel_lowerts 497 497 498 - This hook is called after the server receives a join message for a remote user 499 - with a lower channel timestamp than what the server has for the channel. This 500 - hook is not called during netjoin bursts or when the remote side believes it 501 - has created a new channel; it is only called a join to an existing channel on 502 - the remote side. 498 + This hook is called after the server receives a `JOIN` or `SJOIN` message for 499 + a remote user with a lower channel timestamp than what the server has for the 500 + channel. 503 501 504 502 Hook data: `hook_data_channel *` 505 503 506 504 Fields: 507 505 508 - - client (`struct Client *`): The remote user joining the channel 506 + client (`struct Client *`): For `JOIN`, the remote user joining the channel; 507 + for `SJOIN`, the server issuing the `SJOIN` message 509 508 - chptr (`struct Channel *`): The channel being joined 510 509 - approved (`int`): Unused (always 0) 511 510 512 - At the time the hook is called, client has not yet been added to chptr as a 513 - member, but we have cleared all modes from the local channel. Because this 514 - hook is only called when we receive a JOIN from a remote server and not an 515 - SJOIN, it is not a reliable method of knowing that a local channel has had its 516 - timestamp lowered. 511 + At the time the hook is called, `client` has not yet been added to chptr as a 512 + member (for `JOIN`) or the clients specified in the user list have not yet 513 + been joined to the channel (for `SJOIN`), but we have cleared all modes from 514 + the local channel. 517 515 518 516 ### client_exit 519 517
+6
modules/core/m_join.c
··· 750 750 751 751 /* since we're dropping our modes, we want to clear the mlock as well. --nenolod */ 752 752 set_channel_mlock(client_p, source_p, chptr, NULL, false); 753 + 754 + hook_data_channel hookdata; 755 + hookdata.client = source_p; 756 + hookdata.chptr = chptr; 757 + 758 + call_hook(h_channel_lowerts, &hookdata); 753 759 } 754 760 755 761 if(*modebuf != '\0')