the code can be cleaned up simply enough. lose the / prefix on the chanserv command. they are not needed.. make the /notice into .notice (silences the command as the /notice is noisy and messy)... same with the /msg $chan ... that can be a simple msg $chan
as for the last line you have /msg room <--- that is an illegal statement. you need to use a channel identifier in this case .. use $chan again
also you have brackets mismatch..