summary refs log tree commit diff
path: root/html.c
diff options
context:
space:
mode:
Diffstat (limited to 'html.c')
-rw-r--r--html.c9
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);
 }