jaytea, it's supposed to be $true if the channel is different OR the cid is different. Otherwise you can't be in the same room on another server. The correct code would be this:
if (!%f) && ($istok($strip($1-),$me,32)) && (($chan != $active) || ($cid != $activecid)) {
Obviously you don't need that many () but added for clarity.