why are you echo-ing to $chan if you just finished telling them theirs is flawed because it will only work in channels? why not use the 'a' switch in the echo command? as well as $nick($chan,$me).pnick