MCPcopy Create free account
hub / github.com/GoMudEngine/GoMud / load

Method load

modules/mudmail/mudmail.go:128–135  ·  view source on GitHub ↗

load reads a user's inbox from the plugin data store.

(userId int)

Source from the content-addressed store, hash-verified

126
127// load reads a user's inbox from the plugin data store.
128func (m *MudmailModule) load(userId int) Inbox {
129 var inbox Inbox
130 m.plug.ReadIntoStruct(inboxKey(userId), &inbox)
131 if inbox == nil {
132 inbox = Inbox{}
133 }
134 return inbox
135}
136
137// save writes a user's inbox to the plugin data store.
138func (m *MudmailModule) save(userId int, inbox Inbox) {

Callers 6

onPlayerSpawnMethod · 0.95
SendMudMailMethod · 0.95
mudmailCommandMethod · 0.95
apiAdminSendMudmailMethod · 0.95
apiAdminDeleteMudmailMethod · 0.95
inboxForUserMethod · 0.95

Calls 2

inboxKeyFunction · 0.85
ReadIntoStructMethod · 0.80

Tested by

no test coverage detected