# HG changeset patch # User Matthew Wild # Date 1318293751 -3600 # Node ID 3f101f7a26d0436303fa70a92673390e64303619 # Parent 1969310ea06ab3dcf6023f8a5b240e305c19b72d mod_pastebin: Preserve pastes through a reload diff -r 1969310ea06a -r 3f101f7a26d0 mod_pastebin/mod_pastebin.lua --- a/mod_pastebin/mod_pastebin.lua Tue Oct 11 01:41:22 2011 +0100 +++ b/mod_pastebin/mod_pastebin.lua Tue Oct 11 01:42:31 2011 +0100 @@ -136,3 +136,11 @@ httpserver.new{ port = port, base = base, handler = handle_request, ssl = ssl } end + +function module.save() + return { pastes = pastes }; +end + +function module.restore(data) + pastes = data.pastes or pastes; +end