(Hopefully) fix a weird channel unload bug

This commit is contained in:
calzoneman 2013-07-14 21:00:38 -04:00
parent e5af4051f6
commit fab78019ea
1 changed files with 5 additions and 1 deletions

View File

@ -206,8 +206,12 @@ exports.createChannel = function (name) {
exports.getOrCreateChannel = function (name) {
var chan = exports.getChannel(name);
if(chan !== undefined)
if(chan !== undefined && chan.name !== undefined)
return chan;
else if(chan !== undefined && chan.name === undefined) {
Logger.errlog.log("Empty channel still loaded: ", name);
delete exports.channels[name];
}
return exports.createChannel(name);
}