1. I wrote the !open and !close commands to expect another word, the ":!close *:" and ":!close *:" should elminate the space and asterisk, to be like :!close: and :!open: (no space)

2. Same story with ":!listdel *:" not working without the following word. However to make the event work with and without the word, change the trigger section to remove the space but keep the asterisk like ":!listdel*:" (no space)

This will make it respond to any word beginning with !listdel and look at the following word as the optional nick to remove in place of the person typing it. If you want it to work the same way with !leave you can change the trigger from ":!listdel *:" to ":!leave*:" (no space)