eggdrop icon indicating copy to clipboard operation
eggdrop copied to clipboard

BIND JOIN does not wait for eggdrop to finish channelsync

Open key2peace opened this issue 7 years ago • 3 comments

when you start the bot, and it joins a channel, bind join gets executed before eggdrop is done syncing (which might affect code using [userlist $chan], since WHO hasn't been executed yet or other operations )

key2peace avatar Oct 28 '18 15:10 key2peace

Hi @key2peace, thanks again for pointing this out, you're definitely correct. While I'm certainly not the ultimate authority on this, my thought is we can't do more than document the limitation that you pointed out here. Because of the async nature of JOIN and WHO, we can't "hang out" in the function that handles joins, waiting for a WHO to arrive. And without knowing the 'cause' of a WHO showing up (first join of a channel, a tcl command refreshing the channel, a whois issued by the bot, etc), I don't know that we can correctly trigger a join bind after receiving the WHO. @thommey, thoughts?

If you have a script that is suffering from this, you could perhaps bind to a join, and in the proc that is called set a raw bind for 352 that then does what you're looking for, then unbinds? Sorry, I wish I had a better answer, but maybe someone else can chime in with some thoughts.

vanosg avatar May 23 '20 02:05 vanosg

The idea is to "bind 354" or "bind 352" (depending on network, or just bind both), grab the channel name and then you have a full userlist, yeah. I do have a script that provides this delay, it's worth considering a change in Eggdrop but that would be for 2.0

thommey avatar Nov 01 '20 15:11 thommey