My bad. I wasn't aware that the $cc will only return the first common channel. I was trying to address the scenario when you reply to a nickname in your PM. There is no $chan in the PM. I thought by using a loop through the common channels would get that matter resolved.
Well, apparently Wims has provided you with a code using the regsubex method. But be advised that you must use mIRC version 6.17 or above for Wims' code to work.
Last edited by Tomao; 13/06/11 06:21 PM.