When a defendant, against whom such action has been brought, is adjudged guilty of usurping or intruding into, or unlawfully holding any office, franchise, or privilege, judgment must be rendered that such defendant be excluded from the office, franchise, or privilege, and that he pay the costs of the action. The Court may also, in its discretion, impose upon the defendant a fine not exceeding five thousand dollars, which fine, when collected, must be paid into the Treasury of the State.
Ca. Civ. Proc. Code § 809