3
0
mirror of https://github.com/reality/dbot.git synced 2024-12-18 00:22:35 +01:00

ensure existence of hosts and tempBans

This commit is contained in:
reality 2013-10-22 08:46:22 +00:00
parent 0649a2c0c9
commit 0088d88af6

View File

@ -1,6 +1,8 @@
var _ = require('underscore')._; var _ = require('underscore')._;
var kick = function(dbot) { var kick = function(dbot) {
if(!_.has(dbot.db, 'hosts')) dbot.db.hosts = {};
if(!_.has(dbot.db, 'tempBans')) dbot.db.tempBans = {};
this.hosts = dbot.db.hosts; this.hosts = dbot.db.hosts;
this.tempBans = dbot.db.tempBans; this.tempBans = dbot.db.tempBans;