All of the changes that have been sitting on tildepi for ages. For posterity.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3530 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
2020-09-23 01:58:13 +00:00
parent d6018736d5
commit d293637741
29 changed files with 3380 additions and 8 deletions

View File

@ -98,6 +98,8 @@ class IrcService {
let person = prefix.split('!')[0];
let conversation = parts[1];
this._service.notifyPresenceChanged(conversation, person, "unavailable");
} else if (parts[0] == "PONG") {
// this._service.notifyMessageReceived("", {from: prefix, message: "RTT: " + (new Date().getTime() - parseInt(parts[2]))});
} else if (parts[0] == "QUIT") {
let person = prefix.split('!')[0];
let conversations = this._service.getConversations();
@ -164,9 +166,15 @@ class IrcService {
self._service.notifyStateChanged("connected");
self._send("USER " + options.user + " 0 * :" + options.realName);
self._send("NICK " + options.nick);
self._sendPing();
}).catch(self._service.reportError);
}
_sendPing() {
this._send("PING :" + new Date().getTime());
setTimeout(this._sendPing.bind(this), 3000);
}
sendMessage(target, text) {
if (!target) {
this._socket.write(text + "\r\n");