mirror of
https://github.com/rubenwardy/email.git
synced 2025-07-02 00:10:41 +02:00
Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
fb80608d85 |
@ -1,7 +1,5 @@
|
||||
# Email
|
||||
|
||||

|
||||
|
||||
Created by rubenwardy.
|
||||
|
||||
License: WTFPL.
|
||||
|
1
depends.txt
Normal file
1
depends.txt
Normal file
@ -0,0 +1 @@
|
||||
chatplus?
|
18
init.lua
18
init.lua
@ -72,9 +72,10 @@ end)
|
||||
function email.get_formspec(name)
|
||||
local inbox = email.get_inbox(name)
|
||||
|
||||
local fs = "vertlabel[0,0;Your Inbox]"
|
||||
local fs = "size[12,8]"
|
||||
fs = fs .. "vertlabel[0,0;email Mail]"
|
||||
|
||||
function row(fs, c1, date, from, msg)
|
||||
local function row(fs, c1, date, from, msg)
|
||||
date = minetest.formspec_escape(date)
|
||||
from = minetest.formspec_escape(from)
|
||||
msg = minetest.formspec_escape(msg)
|
||||
@ -126,7 +127,7 @@ function email.show_inbox(name, text_mode)
|
||||
return true, "End of mail (" .. #inbox .. " items)"
|
||||
end
|
||||
else
|
||||
local fs = "size[12,8]" .. email.get_formspec(name)
|
||||
local fs = email.get_formspec(name)
|
||||
minetest.show_formspec(name, "email:inbox", fs)
|
||||
|
||||
return true, "Opened inbox!"
|
||||
@ -135,17 +136,6 @@ function email.show_inbox(name, text_mode)
|
||||
return true
|
||||
end
|
||||
|
||||
if minetest.global_exists("sfinv") then
|
||||
sfinv.register_page("email:inbox", {
|
||||
title = "Inbox",
|
||||
get = function(self, player, context)
|
||||
local name = player:get_player_name()
|
||||
return sfinv.make_formspec(player, context,
|
||||
email.get_formspec(name), false, "size[12,8]")
|
||||
end
|
||||
})
|
||||
end
|
||||
|
||||
minetest.register_on_player_receive_fields(function(player,formname,fields)
|
||||
if fields.clear then
|
||||
local name = player:get_player_name()
|
||||
|
4
mod.conf
4
mod.conf
@ -1,4 +0,0 @@
|
||||
name = email
|
||||
title = Email
|
||||
description = Adds email style inboxes to Minetest.
|
||||
optional_depends = chatplus,sfinv
|
Binary file not shown.
Before Width: | Height: | Size: 270 B After Width: | Height: | Size: 161 B |
Reference in New Issue
Block a user