* AppendImportantMessage(): api function to set Important Messages
authorWilfried Göesgens <willi@citadel.org>
Thu, 29 Jul 2010 20:54:27 +0000 (20:54 +0000)
committerWilfried Göesgens <willi@citadel.org>
Thu, 29 Jul 2010 20:54:27 +0000 (20:54 +0000)
webcit/webcit.c
webcit/webcit.h

index 8ca820422829922ba51664caf718311c757474c0..90575af7c602c34b93f8b80edeef46cd77ad284b 100644 (file)
@@ -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;
index 80df8c66f36430cdd19aabe6e5abb6267251045c..641bc6acbcd81fc0a56193979b7845ef71f2b550 100644 (file)
@@ -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);