diff --git a/components/buffer-header.js b/components/buffer-header.js index 3819111..40834fc 100644 --- a/components/buffer-header.js +++ b/components/buffer-header.js @@ -189,6 +189,10 @@ export default function BufferHeader(props) { let desc = "This user is a server operator, they have administrator privileges."; details.push(html`server operator`); } + if (props.user.bot) { + let desc = "This user is an automated bot."; + details.push(html`bot`); + } details = details.map((item, i) => { if (i === 0) { return item; diff --git a/lib/irc.js b/lib/irc.js index 16dfd6c..6900eec 100644 --- a/lib/irc.js +++ b/lib/irc.js @@ -474,6 +474,10 @@ export class Isupport { } return chanModes; } + + bot() { + return this.raw.get("BOT"); + } } export const CaseMapping = { diff --git a/state.js b/state.js index 8b9f9fe..2bb9846 100644 --- a/state.js +++ b/state.js @@ -454,6 +454,10 @@ export const State = { if (who.flags !== undefined) { who.away = who.flags.indexOf("G") >= 0; // H for here, G for gone who.operator = who.flags.indexOf("*") >= 0; + let botFlag = client.isupport.bot(); + if (botFlag) { + who.bot = who.flags.indexOf(botFlag) >= 0; + } delete who.flags; }