if you mean you want to enable the sound you wanted to have playing when someone joins, or at other times disable the sound, look at using groups. Also look at using spaces and properly constructing your commands
ON 1:JOIN:#:/splay sound/joinsound.wav
should be more like
ON 1:JOIN:#: splay joinsound.wav

inside a "group"

#joinsound on
ON 1:JOIN:#: splay joinsound.wav
#joinsound end

it is important to note this is used in the remotes, not in the aliases or popups

with the "on / off" in the channel menu
Code:
menu channel {
Join Sound
.Turn On: enable #joinsound
.Shut Off: disable #joinsound
}
#joinsound on
ON 1:JOIN:#: splay joinsound.wav 
#joinsound end