mirror of
https://codeberg.org/emersion/gamja
synced 2025-04-22 01:23:56 +02:00
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) {
|
isMyNick(nick) {
|
||||||
|
if (!nick) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
return this.cm(nick) == this.cm(this.nick);
|
return this.cm(nick) == this.cm(this.nick);
|
||||||
}
|
}
|
||||||
|
|
||||||
isChannel(name) {
|
isChannel(name) {
|
||||||
|
if (!name) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
var chanTypes = this.isupport.get("CHANTYPES") || irc.STD_CHANTYPES;
|
var chanTypes = this.isupport.get("CHANTYPES") || irc.STD_CHANTYPES;
|
||||||
return chanTypes.indexOf(name[0]) >= 0;
|
return chanTypes.indexOf(name[0]) >= 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user