mirror of
https://github.com/mt-mods/mail.git
synced 2025-07-05 22:20:37 -04:00
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:
parent
75510d2551
commit
bfe0ef2711
4 changed files with 44 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue