This commit is contained in:
Flummi 2017-11-26 00:26:25 +01:00
parent 3dd7affd96
commit fa6ecd2164
2 changed files with 5 additions and 2 deletions

View File

@ -1,6 +1,5 @@
module.exports = client => {
client._cmd.set("001", function (msg) { // welcome
this.server.me = msg.params[0];
this.join(this.options.channels);
this.emit("data", ["connected", msg.params[1]]);
}.bind(client));

View File

@ -1,3 +1,5 @@
import { getLevel } from "../../admin.js";
module.exports = client => {
client._cmd.set("307", function (msg) { // whois_identified (ircd-hybrid)
let tmpuser = {};
@ -16,7 +18,7 @@ module.exports = client => {
tmpuser.username = msg.params[2];
tmpuser.hostname = msg.params[3];
tmpuser.realname = msg.params[5];
tmpuser.prefix = `${msg.params[2]}!${msg.params[5]}@${msg.params[3]}`;
tmpuser.prefix = `${msg.params[1]}!${msg.params[2]}@${msg.params[3]}`;
this.server.user.set(msg.params[1], tmpuser);
}.bind(client));
@ -44,6 +46,8 @@ module.exports = client => {
channels: tmpuser.channels || [],
cached: ~~(Date.now() / 1000)
};
if(msg.params[0] === msg.params[1])
this.server.me = tmpuser;
this.server.user.set(msg.params[1], tmpuser);
}.bind(client));