3
0
mirror of https://github.com/reality/dbot.git synced 2024-12-03 17:39:28 +01:00

save before reload

This commit is contained in:
reality 2013-08-24 19:19:58 +00:00
parent a10a6bf9e6
commit 55ff01a618

2
run.js
View File

@ -125,6 +125,8 @@ DBot.prototype.save = function() {
// Hot-reload module files.
DBot.prototype.reloadModules = function() {
this.save();
if(this.modules) { // Run 'onDestroy' code for each module if it exists.
_.each(this.modules, function(module) {
if(module.onDestroy) {