Comparison

plugins/mod_pubsub.lua @ 3881:5f3e9d7064a4

mod_pubsub: Preserve service object on module reload
author Matthew Wild <mwild1@gmail.com>
date Fri, 17 Dec 2010 13:35:21 +0000
parent 3880:2b736209bf21
child 3908:4d8081c35f01
comparison
equal deleted inserted replaced
3880:2b736209bf21 3881:5f3e9d7064a4
193 service = pubsub.new({ 193 service = pubsub.new({
194 broadcaster = simple_broadcast 194 broadcaster = simple_broadcast
195 }); 195 });
196 module.environment.service = service; 196 module.environment.service = service;
197 197
198 function module.save()
199 return { service = service };
200 end
201
202 function module.restore(data)
203 service = data.service;
204 module.environment.service = service;
205 end