I\'m not really in to these kind of things, but the code needs a lot of improvements and I don\'t think anyone else has stepped up to the plate yet:
I\'d use $wildsite preferably as they could easily change nicks and comeback. And you should change the set %joined [ $+ [ $nick ] ] to unset %joined [ $+ [ $nick ] ] as your variables would flood out easily. Also, your /chan alias won\'t work because you are setting %chan to $2 instead of $1. And if we don\'t specify $2, then who nothing will work. Your /chanoff alias, your /echo command should be %chan and not chan. You could also receive an error message if you are not an op in %chan, so please provide error checking and clean up the code. Finally, please learn how to use if then else statements. /help $wildsite and /help if then else 2/10 really.