Introduce State.handleMessage

Takes an IRC message, updates the state.

Doesn't yet handle all messages, this will be a step-by-step process.
This commit is contained in:
Simon Ser
2021-06-04 18:27:21 +02:00
parent 4d988cafeb
commit 2c1bb4ce6a
3 changed files with 118 additions and 111 deletions

View File

@@ -466,6 +466,11 @@ export default class Client extends EventTarget {
return this.cm(nick) == this.cm(this.nick);
}
isChannel(name) {
// TODO: use the ISUPPORT token if available
return irc.STD_CHANNEL_TYPES.indexOf(name[0]) >= 0;
}
setPingInterval(sec) {
clearInterval(this.pingIntervalID);
this.pingIntervalID = null;