Changeset

454:3f101f7a26d0

mod_pastebin: Preserve pastes through a reload
author Matthew Wild <mwild1@gmail.com>
date Tue, 11 Oct 2011 01:42:31 +0100
parents 453:1969310ea06a
children 455:52f2188ec47d
files mod_pastebin/mod_pastebin.lua
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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