mirror of https://github.com/calzoneman/sync.git
Add check for error condition exposed by misbehaving bot
This commit is contained in:
parent
976b0a2168
commit
bfe0d75278
|
@ -369,6 +369,14 @@ Channel.prototype.joinUser = function (user, data) {
|
|||
|
||||
user.channel = self;
|
||||
user.waitFlag(Flags.U_LOGGED_IN, () => {
|
||||
if (self.dead) {
|
||||
LOGGER.warn(
|
||||
'Got U_LOGGED_IN for %s after channel already unloaded',
|
||||
user.getName()
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
if (user.is(Flags.U_REGISTERED)) {
|
||||
db.channels.getRank(self.name, user.getName(), (error, rank) => {
|
||||
if (!error) {
|
||||
|
|
Loading…
Reference in New Issue