Diff

net/server_event.lua @ 2335:060fb67cefd5

net.server_event: Add setquitting() function to be compatible with net.server_select
author Matthew Wild <mwild1@gmail.com>
date Mon, 07 Dec 2009 19:26:12 +0000
parent 2334:4cedfeeaaed4
child 2336:fb1d9d2444df
line wrap: on
line diff
--- a/net/server_event.lua	Mon Dec 07 19:25:16 2009 +0000
+++ b/net/server_event.lua	Mon Dec 07 19:26:12 2009 +0000
@@ -766,6 +766,14 @@
 	end
 end
 
+local function setquitting(yes)
+	if yes then
+		 -- Quit now
+		 closeallservers();
+		 base:loopexit();
+	end
+end
+
 return {
 
 	cfg = cfg,