Gummo, i'm not sure what you're referring to :P the first 2 lines of code in my post are equivalent; one is Jethro_'s original line and the other is to show why that line is incorrect. the 3rd behaves just as your example does and is also correct
i realize that the condition i used might be quite confusing to understand :p perhaps this will help explain it:
if ($chan $cid == $active $activecid) checks if ($chan == $active) && ($cid == $activecid), ie. it checks the channel is the correct one. to check it is not the correct one, you need only negate that condition and the negation of == is !=