Well ripped :/ you can tell because you refer to a channel as a channel, then in the bits you've added it says room, why not just use $chan and $network for channel and network?
Also, you've used $address($1,2) - so why can't you implement this bit in the email address bit instead of using IDENT GOES HERE etc?
Please give credit where due.