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) {
prefix = /:?(.*)\!(.*)@(.*)/.exec(prefix);
if(!prefix[1])
if(!prefix)
return false; //this.parsePrefix(arguments);
return {
nick: prefix[1],

View File

@ -37,9 +37,8 @@ export default bot => {
.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)", [
(e.type === "tg" ? e.user.username || e.user.nick : e.user.nick), tmp, e.user.prefix
]).then(() => {
e.reply(output);
}).catch(err => console.log(err));
]).then(() => e.reply(output))
.catch(err => console.log(err));
}
}
}