This commit is contained in:
Flummi 2020-02-20 17:57:41 +01:00
parent 85c2a6f963
commit 15e4d6af5e
4 changed files with 4 additions and 4 deletions

View File

@ -1,6 +1,6 @@
{
"name": "cuffeo",
"version": "1.0.5-1",
"version": "1.0.5-2",
"description": "A multi-protocol chatbot library with nearly zero dependencies.",
"main": "src/index.mjs",
"scripts": {},

View File

@ -106,7 +106,7 @@ export default class irc extends EventEmitter {
channelid: tmp.params[0],
user: { ...this.parsePrefix(tmp.prefix), ...{
account: this.server.user.has(this.parsePrefix(tmp.prefix).nick) ? this.server.user.get(this.parsePrefix(tmp.prefix).nick).account : false,
prefix: tmp.prefix.charAt(0) === ":" ? tmp.prefix.substring(1) : tmp.prefix
prefix: (tmp.prefix.charAt(0) === ":" ? tmp.prefix.substring(1) : tmp.prefix) + `@${this.network}`
}},
message: tmp.params[1].replace(/\u0002/, ""),
time: ~~(Date.now() / 1000),

View File

@ -184,7 +184,7 @@ export default class slack extends EventEmitter {
channel: this.server.channel.get(tmp.channel), // get channelname
channelid: tmp.channel,
user: {
prefix: `${tmp.user}!${this.server.user.get(tmp.user).account}`, // get username
prefix: `${tmp.user}!${this.server.user.get(tmp.user).account}@${this.network}`, // get username
nick: this.server.user.get(tmp.user).nickname, // get username
username: this.server.user.get(tmp.user).nickname, // get username
account: this.server.user.get(tmp.user).account

View File

@ -101,7 +101,7 @@ export default class tg extends EventEmitter {
channel: tmp.chat.title,
channelid: tmp.chat.id,
user: {
prefix: `${tmp.from.username}!${tmp.from.id}`,
prefix: `${tmp.from.username}!${tmp.from.id}@${this.network}`,
nick: tmp.from.first_name,
username: tmp.from.username,
account: tmp.from.id.toString()