Add support for account-notify

This commit is contained in:
Simon Ser 2021-09-21 14:49:32 +02:00
parent 8e631f97ef
commit d12e1109b3
3 changed files with 9 additions and 0 deletions

View file

@ -464,6 +464,12 @@ export const State = {
username: msg.params[0],
hostname: msg.params[1],
});
case "ACCOUNT":
let account = msg.params[0];
if (account === "*") {
account = null;
}
return updateUser(msg.prefix.name, { account });
case "AWAY":
let awayMessage = msg.params[0];
return updateUser(msg.prefix.name, { away: !!awayMessage });