Add checks for dead channels
This commit is contained in:
parent
705b8ce10a
commit
5f0d2db1be
2 changed files with 10 additions and 1 deletions
|
|
@ -108,7 +108,7 @@ ChatModule.prototype.shadowMutedUsers = function () {
|
|||
ChatModule.prototype.handleChatMsg = function (user, data) {
|
||||
var self = this;
|
||||
|
||||
if (!this.channel.modules.permissions.canChat(user)) {
|
||||
if (!this.channel || !this.channel.modules.permissions.canChat(user)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -135,6 +135,10 @@ ChatModule.prototype.handleChatMsg = function (user, data) {
|
|||
};
|
||||
|
||||
ChatModule.prototype.handlePm = function (user, data) {
|
||||
if (!this.channel) {
|
||||
return;
|
||||
}
|
||||
|
||||
var reallyTo = data.to;
|
||||
data.to = data.to.toLowerCase();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue