Yes. You can compare $cid to $lactivecid

Code:
on *:active:*:{
  if ($cid != $lactivecid) ; I've changed networks.
}