about summary refs log tree commit diff
path: root/server.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--server.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/server.h b/server.h
index 45008a1..eee5419 100644
--- a/server.h
+++ b/server.h
@@ -83,6 +83,7 @@ extern int contextsRecent;
 extern bool contextsPublic;
 extern const char *NetworksQuery;
 extern const char *ContextsQuery;
+extern const char *ContextsMOTDQuery;
 enum kcgi_err networksPage(struct kreq *req);
 enum kcgi_err contextsPage(struct kreq *req);
 
@@ -100,6 +101,7 @@ extern sqlite3 *db;
 extern struct Statements {
 	sqlite3_stmt *networks;
 	sqlite3_stmt *contexts;
+	sqlite3_stmt *contextsMOTD;
 	sqlite3_stmt *eventsAfter;
 	sqlite3_stmt *eventsBefore;
 	sqlite3_stmt *search;
@@ -115,6 +117,7 @@ static inline void dbPrepare(sqlite3_stmt **stmt, const char *query) {
 static inline void dbPrepareAll(void) {
 	dbPrepare(&stmt.networks, NetworksQuery);
 	dbPrepare(&stmt.contexts, ContextsQuery);
+	dbPrepare(&stmt.contextsMOTD, ContextsMOTDQuery);
 	dbPrepare(&stmt.eventsAfter, EventsAfterQuery);
 	dbPrepare(&stmt.eventsBefore, EventsBeforeQuery);
 	dbPrepare(&stmt.search, SearchQuery);
@@ -123,6 +126,7 @@ static inline void dbPrepareAll(void) {
 static inline void dbClose(void) {
 	sqlite3_finalize(stmt.networks);
 	sqlite3_finalize(stmt.contexts);
+	sqlite3_finalize(stmt.contextsMOTD);
 	sqlite3_finalize(stmt.eventsAfter);
 	sqlite3_finalize(stmt.eventsBefore);
 	sqlite3_finalize(stmt.search);