diff options
author | June McEnroe <june@causal.agency> | 2020-07-10 16:28:51 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2020-07-10 16:31:33 -0400 |
commit | f94b37baf4304b901c93b5fee076738946e1820f (patch) | |
tree | a0ef905cf38e4c962d6622872ef99d87c854a2cd /html.c | |
parent | Add IRC colors and implement nick coloring (diff) | |
download | scooper-f94b37baf4304b901c93b5fee076738946e1820f.tar.gz scooper-f94b37baf4304b901c93b5fee076738946e1820f.zip |
Add basic messages to table and attempt to style
Diffstat (limited to 'html.c')
-rw-r--r-- | html.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/html.c b/html.c index c1e4b15..37e52b3 100644 --- a/html.c +++ b/html.c @@ -271,6 +271,14 @@ static enum kcgi_err eventNick(struct khtmlreq *html, struct Event event) { return error; } +static enum kcgi_err eventMessage(struct khtmlreq *html, struct Event event) { + if (!event.message) return KCGI_OK; + return 0 + || khtml_attr(html, KELEM_TD, KATTR_CLASS, "message", KATTR__MAX) + || khtml_puts(html, event.message) + || khtml_closeelem(html, 1); +} + static const char *Types[TypesLen] = { #define X(id, name) [id] = name, ENUM_TYPE @@ -290,5 +298,6 @@ enum kcgi_err htmlEvent(struct khtmlreq *html, struct Event event) { || eventNetwork(html, event) || eventContext(html, event) || eventNick(html, event) + || eventMessage(html, event) || khtml_closeelem(html, 1); } |