components/buffer: add RPL_UMODEIS pretty-printing

This commit is contained in:
Simon Ser 2021-10-05 11:22:20 +02:00
parent 0b4302e059
commit 19ee5553f6
2 changed files with 9 additions and 0 deletions

View file

@ -194,6 +194,14 @@ class LogLine extends Component {
lineClass = "motd"; lineClass = "motd";
content = linkify(stripANSI(msg.params[1]), onChannelClick); content = linkify(stripANSI(msg.params[1]), onChannelClick);
break; break;
case irc.RPL_UMODEIS:
let mode = msg.params[1];
if (mode) {
content = html`Your user mode is ${mode}`;
} else {
content = html`You have no user mode`;
}
break;
default: default:
if (irc.isError(msg.command) && msg.command != irc.ERR_NOMOTD) { if (irc.isError(msg.command) && msg.command != irc.ERR_NOMOTD) {
lineClass = "error"; lineClass = "error";

View file

@ -4,6 +4,7 @@ export const RPL_YOURHOST = "002";
export const RPL_CREATED = "003"; export const RPL_CREATED = "003";
export const RPL_MYINFO = "004"; export const RPL_MYINFO = "004";
export const RPL_ISUPPORT = "005"; export const RPL_ISUPPORT = "005";
export const RPL_UMODEIS = "221";
export const RPL_WHOISUSER = "311"; export const RPL_WHOISUSER = "311";
export const RPL_WHOISSERVER = "312"; export const RPL_WHOISSERVER = "312";
export const RPL_WHOISOPERATOR = "313"; export const RPL_WHOISOPERATOR = "313";