diff mod_pastebin/mod_pastebin.lua @ 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 56f1c29ee7f1
children e851f386c904
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