forked from CringeStudios/gamja
lib/client: gracefully handle null in isMyNick/isChannel
This commit is contained in:
parent
0705f4b182
commit
41354d3035
@ -477,10 +477,16 @@ export default class Client extends EventTarget {
|
||||
}
|
||||
|
||||
isMyNick(nick) {
|
||||
if (!nick) {
|
||||
return false;
|
||||
}
|
||||
return this.cm(nick) == this.cm(this.nick);
|
||||
}
|
||||
|
||||
isChannel(name) {
|
||||
if (!name) {
|
||||
return false;
|
||||
}
|
||||
var chanTypes = this.isupport.get("CHANTYPES") || irc.STD_CHANTYPES;
|
||||
return chanTypes.indexOf(name[0]) >= 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user