Open key2peace opened 6 years ago
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.
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
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 )