Initial implementation of spam check

It checks during the sends if there are spam warnings then give to the message an attribute spam=true (only for receivers)
This commit is contained in:
Athozus 2023-12-24 15:44:29 +01:00
parent 75510d2551
commit bfe0ef2711
4 changed files with 44 additions and 0 deletions

View file

@ -97,6 +97,9 @@ function mail.show_inbox(name, sortfieldindex, sortdirection, filter)
if not mail.player_in_list(name, message.to) and cc_color_enable then
table.insert(displayed_color, "additional")
end
if message.spam then
table.insert(displayed_color, "warning")
end
formspec[#formspec + 1] = "," .. mail.get_color(displayed_color)
formspec[#formspec + 1] = ","
formspec[#formspec + 1] = minetest.formspec_escape(message.from)