Translation:Shulchan Aruch/Choshen Mishpat/27
Paragraph 1- If one cursed a Jew- even if he curses himself- with the name of God, a nickname or one of the names that gentiles use for God, and it was with witnesses and a warning, he would receive one set of lashes because of “lo sikalel cheresh.” If the cursed individual was a judge, he would receive a second set of lashes because of “elohim lo sikalel.” The word “arrur” is considered a curse.
Paragraph 2- If there was no warning, he did not use a name or surname of God or the curse was via inference, such as where he said so-and-so should not be blessed by God, he will not receive lashes. (In the same vein, one who curses a deceased person is exempt.) It is still prohibited, however. If he degrades a scholar, we put a nidui on him. If the court wants to give him mardus lashes, they can whip him and punish him as much as they see fit. If he degraded an ignoramus, we punish him as much as the circumstances require. (We punish him even if the victim forgave him because he already committed the sin and was liable.) If one deserves a nidui because he treated the court with disrespect, but the court wants to waive their honor and not put a nidui on him, they may do so, so long as it will not cause a loss in the honor of Hashem, such as a case where the people would treat the honor of Torah and judges lightly, in which case we would need to punish as is appropriate since the people were lax in this matter.