(a) Upon the commencement of any action filed by a pro se plaintiff in the court of common pleas, a defendant may file a motion to dismiss the action on the basis that:
(1) the pro se plaintiff is alleging the same or related claims which the pro se plaintiff raised in a prior action against the same or related defendants, and(2) these claims have already been resolved pursuant to a written settlement agreement or a court proceeding.(b) The court may stay the action while the motion is pending.(c) Upon granting the motion and dismissing the action, the court may bar the pro se plaintiff from pursuing additional pro se litigation against the same or related defendants raising the same or related claims without leave of court.(d) The court may sua sponte dismiss an action that is filed in violation of a court order entered under subdivision (c).