Put the code that's IN the JOIN event, not put the ON JOIN itself there too.
Take out the ON JOIN line from within ON QUIT, and also take out the matching end curly brace too.

If you want to be alerted when people QUIT, you may also wish to also be alerted when they click to close the channel window without quitting from the network too. The syntax to handle the PART event is the same as for the JOIN event. You would copy the entire ON JOIN event below it, then change :JOIN: into :PART:

But only make 1 change at a time, to be certain each change is correct. While the remote editor is open, click in the upper right corner on the checkmark within the circle so it verifies if your matching curly braces are correct.