* fix COND:PREFS
[citadel.git] / webcit / context_loop.c
index e505b5465d00606e231372d2e7433c9ded6a035b..4cf0b5bfee7ee265d8444d283bec75d3e1ec5b79 100644 (file)
@@ -553,3 +553,17 @@ void context_loop(int *sock)
        
        
 }
+
+void tmpl_nonce(StrBuf *Target, int nArgs, WCTemplateToken *Tokens, void *Context)
+{
+       struct wcsession *WCC = WC;
+       StrBufAppendPrintf(Target, "%ld",
+                          (WCC != NULL)? WCC->nonce:0);                   
+}
+
+void 
+InitModule_CONTEXT
+(void)
+{
+       RegisterNamespace("NONCE", 0, 0, tmpl_nonce);
+}