This commit is contained in:
Flummi
2017-11-13 21:11:13 +01:00
parent 9babb3b8de
commit e04294816e
2 changed files with 12 additions and 4 deletions

View File

@ -18,6 +18,7 @@ class irc {
this.username = this.options.username || "test";
this.realname = this.options.realname || "test";
this.channels = this.options.channels || [];
this._recachetime = (10 * 1000); // 10 minutes
this.server = {
motd: "",
me: {},
@ -75,9 +76,10 @@ class irc {
account: tmpuser.account || false,
registered: tmpuser.registered || false,
oper: tmpuser.oper || false,
channels: tmpuser.channels || []
channels: tmpuser.channels || [],
cached: ~~(Date.now() / 1000)
};
this.server.user.set( msg.params[1], tmpuser );
this.server.user.set( msg.params[1].toLowerCase(), tmpuser );
break;
case "319": // Chanlist Todo
let tmpchan = new Map();
@ -119,6 +121,7 @@ class irc {
username: msg.params[2],
hostname: msg.params[3]
});
this.send(`WHOIS ${msg.params[5]}`);
break;
case "315": // who_end
console.log(this.server.channel);