From: Wilfried Göesgens Date: Thu, 29 Jul 2010 20:54:27 +0000 (+0000) Subject: * AppendImportantMessage(): api function to set Important Messages X-Git-Tag: v8.01~987 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=566a9edfb36ddd5f02ee82209e80922a5fe56b46 * AppendImportantMessage(): api function to set Important Messages --- diff --git a/webcit/webcit.c b/webcit/webcit.c index 8ca820422..90575af7c 100644 --- a/webcit/webcit.c +++ b/webcit/webcit.c @@ -786,6 +786,18 @@ int Conditional_IS_HTTPS(StrBuf *Target, WCTemplputParams *TP) return is_https != 0; } +void AppendImportantMessage(const char *pch, long len) +{ + wcsession *WCC = WC; + int IsNew = 0; + + if (StrLength(WCC->ImportantMsg) > 0) { + StrBufAppendBufPlain(WCC->ImportantMsg, HKEY("\n")); + } + + StrBufAppendBufPlain(WCC->ImportantMsg, pch, len); +} + int ConditionalImportantMesage(StrBuf *Target, WCTemplputParams *TP) { wcsession *WCC = WC; diff --git a/webcit/webcit.h b/webcit/webcit.h index 80df8c66f..641bc6acb 100644 --- a/webcit/webcit.h +++ b/webcit/webcit.h @@ -878,6 +878,8 @@ void utf8ify_rfc822_string(char **buf); void begin_burst(void); long end_burst(void); +void AppendImportantMessage(const char *pch, long len); + extern char *hourname[]; /* Names of hours (12am, 1am, etc.) */ void http_datestring(char *buf, size_t n, time_t xtime);