I just now joined freenet to try this script, and it works the way I expected. As I join the channel, the script does a /who of the channel, and triggers the 352/315.

If you're not getting a 352 or 315 but are getting the 353/366, then either you have another script that intercepts 352/315 and suppresses them, or else you have a different ON JOIN event that's running instead of my snippet, and it has a "/names #channel" instead of "/who #channel". I executed "/names #channel" and I did get the expected 353/366 instead of the 352/315. I'm guessing you're not getting .inwho to be $true because you're doing /names instead of /who.