onSave persists all currently loaded inboxes.
()
| 141 | |
| 142 | // onSave persists all currently loaded inboxes. |
| 143 | func (m *MudmailModule) onSave() { |
| 144 | for userId, inbox := range m.inboxes { |
| 145 | m.save(userId, inbox) |
| 146 | } |
| 147 | } |
| 148 | |
| 149 | // onPlayerSpawn loads the user's inbox into memory and migrates legacy data. |
| 150 | func (m *MudmailModule) onPlayerSpawn(e events.Event) events.ListenerReturn { |