X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Froomops.c;h=ea6acbef220b7fd8a56312b73b6c1c73028ce7f5;hb=8672fe68de859968c00739f0075a1d38b9696a23;hp=970c4a0c8ea33073dfd95366aba40bb4027d48c3;hpb=762ba9d1859c0d75c92720f4e2137e2dce817cb7;p=citadel.git diff --git a/webcit/roomops.c b/webcit/roomops.c index 970c4a0c8..ea6acbef2 100644 --- a/webcit/roomops.c +++ b/webcit/roomops.c @@ -1033,6 +1033,23 @@ void tmplput_CurrentRoomDefView(StrBuf *Target, WCTemplputParams *TP) StrBufAppendPrintf(Target, "%d", WCC->CurRoom.DefView); } +void tmplput_CurrentRoom_nNewMessages(StrBuf *Target, WCTemplputParams *TP) +{ + wcsession *WCC = WC; + + LoadRoomXA(); + + StrBufAppendPrintf(Target, "%d", WCC->CurRoom.nNewMessages); +} + +void tmplput_CurrentRoom_nTotalMessages(StrBuf *Target, WCTemplputParams *TP) +{ + wcsession *WCC = WC; + + LoadRoomXA(); + + StrBufAppendPrintf(Target, "%d", WCC->CurRoom.nTotalMessages); +} int ConditionalThisRoomOrder(StrBuf *Target, WCTemplputParams *TP) { @@ -3494,6 +3511,9 @@ InitModule_ROOMOPS RegisterConditional(HKEY("COND:ROOM:FLAG:UA"), 0, ConditionalRoomHas_UAFlag, CTX_ROOMS); RegisterIterator("ITERATE:THISROOM:WHO_KNOWS", 0, NULL, GetWhoKnowsHash, NULL, DeleteHash, CTX_STRBUF, CTX_NONE, IT_NOFLAG); + RegisterNamespace("THISROOM:MSGS:NEW", 0, 0, tmplput_CurrentRoom_nNewMessages, NULL, CTX_NONE); + RegisterNamespace("THISROOM:MSGS:TOTAL", 0, 0, tmplput_CurrentRoom_nTotalMessages, NULL, CTX_NONE); + RegisterNamespace("THISROOM:FLOOR:NAME", 0, 1, tmplput_CurrentRoomFloorName, NULL, CTX_NONE); RegisterNamespace("THISROOM:AIDE", 0, 1, tmplput_CurrentRoomAide, NULL, CTX_NONE); RegisterNamespace("THISROOM:PASS", 0, 1, tmplput_CurrentRoomPass, NULL, CTX_NONE);