Käferfixing

This commit is contained in:
Flummi 2018-03-15 16:25:04 +01:00
parent b236de177d
commit ba8597b41d
2 changed files with 4 additions and 5 deletions

View File

@ -156,7 +156,7 @@ export class irc extends EventEmitter {
} }
parsePrefix(prefix) { parsePrefix(prefix) {
prefix = /:?(.*)\!(.*)@(.*)/.exec(prefix); prefix = /:?(.*)\!(.*)@(.*)/.exec(prefix);
if(!prefix[1]) if(!prefix)
return false; //this.parsePrefix(arguments); return false; //this.parsePrefix(arguments);
return { return {
nick: prefix[1], nick: prefix[1],

View File

@ -36,10 +36,9 @@ export default bot => {
.replace(/\t/g, "") .replace(/\t/g, "")
.split("[native code]").join("")); .split("[native code]").join(""));
sql.any("insert into nxy_users (nick, prefix, sandbox) values (lower($1), $3, $2) on conflict (prefix) do update set sandbox = $2, nick = lower($1)", [ sql.any("insert into nxy_users (nick, prefix, sandbox) values (lower($1), $3, $2) on conflict (prefix) do update set sandbox = $2, nick = lower($1)", [
(e.type === "tg" ? e.user.username || e.user.nick:e.user.nick), tmp, e.user.prefix (e.type === "tg" ? e.user.username || e.user.nick : e.user.nick), tmp, e.user.prefix
]).then(() => { ]).then(() => e.reply(output))
e.reply(output); .catch(err => console.log(err));
}).catch(err => console.log(err));
} }
} }
} }