bd2648d6e2a919a1959ca6f7241cfb9aa31b6cec
[citadel.git] / webcit / roomtokens.c
1 /*
2  * $Id$
3  * Lots of different room-related operations.
4  */
5
6 #include "webcit.h"
7 #include "webserver.h"
8
9
10 /*
11  * Embed the room banner
12  *
13  * got                  The information returned from a GOTO server command
14  * navbar_style         Determines which navigation buttons to display
15  *
16  */
17 void tmplput_roombanner(StrBuf *Target, WCTemplputParams *TP)
18 {
19         wcsession *WCC = WC;
20         
21         /* refresh current room states... */
22         /* dosen't work??? gotoroom(NULL); */
23         wc_printf("<div id=\"banner\">\n");
24
25         /* The browser needs some information for its own use */
26         wc_printf("<script type=\"text/javascript\">    \n"
27                   "     room_is_trash = %d;             \n"
28                   "</script>\n",
29                   ((WC->CurRoom.RAFlags & UA_ISTRASH) != 0)
30                 );
31
32         /*
33          * If the user happens to select the "make this my start page" link,
34          * we want it to remember the URL as a "/dotskip" one instead of
35          * a "skip" or "gotonext" or something like that.
36          */
37         if (WCC->Hdr->this_page == NULL) {
38                 WCC->Hdr->this_page = NewStrBuf();
39         }
40         StrBufPrintf(WCC->Hdr->this_page, 
41                      "dotskip?room=%s",
42                      ChrPtr(WC->CurRoom.name)
43                 );
44
45         do_template("roombanner", NULL);
46         /* roombanner contains this for mobile */
47         if (WC->is_mobile)
48                 return;
49
50         do_template("navbar", NULL);
51         wc_printf("</div>\n");
52 }
53
54
55 /*******************************************************************************
56  ********************** FLOOR Tokens *******************************************
57  ******************************************************************************/
58 void tmplput_FLOOR_ID(StrBuf *Target, WCTemplputParams *TP) 
59 {
60         Floor *myFloor = (Floor *)CTX;
61
62         StrBufAppendPrintf(Target, "%d", myFloor->ID);
63 }
64 void tmplput_ROOM_FLOORID(StrBuf *Target, WCTemplputParams *TP) 
65 {
66         folder *Folder = (folder *)CTX;
67         StrBufAppendPrintf(Target, "%d", Folder->floorid);
68 }
69 void tmplput_ROOM_FLOOR_ID(StrBuf *Target, WCTemplputParams *TP) 
70 {
71         folder *Folder = (folder *)CTX;
72         const Floor *pFloor = Folder->Floor;
73
74         if (pFloor == NULL)
75                 return;
76
77         StrBufAppendPrintf(Target, "%d", pFloor->ID);
78 }
79
80 void tmplput_ROOM_FLOOR_NAME(StrBuf *Target, WCTemplputParams *TP) 
81 {
82         folder *Folder = (folder *)CTX;
83         const Floor *pFloor = Folder->Floor;
84
85         if (pFloor == NULL)
86                 return;
87
88         StrBufAppendTemplate(Target, TP, pFloor->Name, 0);
89 }
90 void tmplput_ThisRoomFloorName(StrBuf *Target, WCTemplputParams *TP) 
91 {
92         wcsession *WCC = WC;
93         folder *Folder = &WCC->CurRoom;
94         const Floor *pFloor;
95
96         if (Folder == NULL)
97                 return;
98
99         pFloor = Folder->Floor;
100         if (pFloor == NULL)
101                 return;
102
103         StrBufAppendTemplate(Target, TP, pFloor->Name, 0);
104 }
105 void tmplput_FLOOR_NAME(StrBuf *Target, WCTemplputParams *TP) 
106 {
107         Floor *myFloor = (Floor *)CTX;
108
109         StrBufAppendTemplate(Target, TP, myFloor->Name, 0);
110 }
111
112 void tmplput_FLOOR_NROOMS(StrBuf *Target, WCTemplputParams *TP) 
113 {
114         Floor *myFloor = (Floor *)CTX;
115
116         StrBufAppendPrintf(Target, "%d", myFloor->NRooms);
117 }
118 void tmplput_ROOM_FLOOR_NROOMS(StrBuf *Target, WCTemplputParams *TP) 
119 {
120         folder *Folder = (folder *)CTX;
121         const Floor *pFloor = Folder->Floor;
122
123         if (pFloor == NULL)
124                 return;
125         StrBufAppendPrintf(Target, "%d", pFloor->NRooms);
126 }
127 int ConditionalFloorHaveNRooms(StrBuf *Target, WCTemplputParams *TP)
128 {
129         Floor *MyFloor = (Floor *)CTX;
130         int HaveN;
131
132         HaveN = GetTemplateTokenNumber(Target, TP, 0, 0);
133
134         return HaveN == MyFloor->NRooms;
135 }
136
137 int ConditionalFloorIsRESTSubFloor(StrBuf *Target, WCTemplputParams *TP)
138 {
139         wcsession  *WCC = WC;
140         Floor *MyFloor = (Floor *)CTX;
141         /** if we have dav_depth the client just wants the subfloors */
142         if ((WCC->Hdr->HR.dav_depth == 1) && 
143             (GetCount(WCC->Directory) == 0))
144                 return 1;
145         return WCC->CurrentFloor == MyFloor;
146 }
147 int ConditionalFloorIsSUBROOM(StrBuf *Target, WCTemplputParams *TP)
148 {
149         wcsession  *WCC = WC;
150         Floor *MyFloor = (Floor *)CTX;
151
152         return WCC->CurRoom.floorid == MyFloor->ID;
153 }
154
155
156 int ConditionalFloorIsVirtual(StrBuf *Target, WCTemplputParams *TP)
157 {
158         Floor *MyFloor = (Floor *)CTX;
159
160         return MyFloor->ID == VIRTUAL_MY_FLOOR;
161 }
162
163
164
165 /*******************************************************************************
166  ********************** ROOM Tokens ********************************************
167  ******************************************************************************/
168 /**** Name ******/
169 void tmplput_RoomName(StrBuf *Target, WCTemplputParams *TP)
170 {
171         StrBufAppendTemplate(Target, TP, WC->CurRoom.name, 0);
172 }
173 void tmplput_current_room(StrBuf *Target, WCTemplputParams *TP)
174 {
175         wcsession *WCC = WC;
176
177         if (WCC != NULL)
178                 StrBufAppendTemplate(Target, TP, 
179                                      WCC->CurRoom.name, 
180                                      0); 
181 }
182 void tmplput_ROOM_NAME(StrBuf *Target, WCTemplputParams *TP) 
183 {
184         folder *Folder = (folder *)CTX;
185
186         if (Folder == NULL)
187         {
188                 wcsession *WCC = WC;
189
190                 if (WCC == NULL)
191                         return;
192                 Folder = &WCC->CurRoom;
193         }
194         StrBufAppendTemplate(Target, TP, Folder->name, 0);
195 }
196 void tmplput_ROOM_BASENAME(StrBuf *Target, WCTemplputParams *TP) 
197 {
198         folder *room = (folder *)CTX;
199
200         if (room->nRoomNameParts > 1)
201                 StrBufAppendTemplate(Target, TP, 
202                                       room->RoomNameParts[room->nRoomNameParts - 1], 0);
203         else 
204                 StrBufAppendTemplate(Target, TP, room->name, 0);
205 }
206 void tmplput_ROOM_LEVEL_N_TIMES(StrBuf *Target, WCTemplputParams *TP) 
207 {
208         folder *room = (folder *)CTX;
209         int i;
210         const char *AppendMe;
211         long AppendMeLen;
212
213
214         if (room->nRoomNameParts > 1)
215         {
216                 GetTemplateTokenString(Target, TP, 0, &AppendMe, &AppendMeLen);
217                 for (i = 0; i < room->nRoomNameParts; i++)
218                         StrBufAppendBufPlain(Target, AppendMe, AppendMeLen, 0);
219         }
220 }
221 int ConditionalRoomIsInbox(StrBuf *Target, WCTemplputParams *TP)
222 {
223         folder *Folder = (folder *)CTX;
224         return Folder->is_inbox;
225 }
226
227 /****** Properties ******/
228 int ConditionalThisRoomHas_QRFlag(StrBuf *Target, WCTemplputParams *TP)
229 {
230         long QR_CheckFlag;
231         wcsession *WCC = WC;
232         
233         QR_CheckFlag = GetTemplateTokenNumber(Target, TP, 2, 0);
234         if (QR_CheckFlag == 0)
235                 LogTemplateError(Target, "Conditional", ERR_PARM1, TP,
236                                  "requires one of the #\"QR*\"- defines or an integer flag 0 is invalid!");
237         
238         if (WCC == NULL)
239                 return 0;
240
241         if ((TP->Tokens->Params[2]->MaskBy == eOR) ||
242             (TP->Tokens->Params[2]->MaskBy == eNO))
243                 return (WCC->CurRoom.QRFlags & QR_CheckFlag) != 0;
244         else
245                 return (WCC->CurRoom.QRFlags & QR_CheckFlag) == QR_CheckFlag;
246 }
247 int ConditionalRoomHas_QRFlag(StrBuf *Target, WCTemplputParams *TP)
248 {
249         long QR_CheckFlag;
250         folder *Folder = (folder *)(TP->Context);
251
252         QR_CheckFlag = GetTemplateTokenNumber(Target, TP, 2, 0);
253         if (QR_CheckFlag == 0)
254                 LogTemplateError(Target, "Conditional", ERR_PARM1, TP,
255                                  "requires one of the #\"QR*\"- defines or an integer flag 0 is invalid!");
256
257         if ((TP->Tokens->Params[2]->MaskBy == eOR) ||
258             (TP->Tokens->Params[2]->MaskBy == eNO))
259                 return (Folder->QRFlags & QR_CheckFlag) != 0;
260         else
261                 return (Folder->QRFlags & QR_CheckFlag) == QR_CheckFlag;
262 }
263 void tmplput_ROOM_QRFLAGS(StrBuf *Target, WCTemplputParams *TP) 
264 {
265         folder *Folder = (folder *)CTX;
266         StrBufAppendPrintf(Target, "%d", Folder->QRFlags);
267 }
268
269
270 int ConditionalThisRoomHas_QRFlag2(StrBuf *Target, WCTemplputParams *TP)
271 {
272         long QR2_CheckFlag;
273         wcsession *WCC = WC;
274         
275         QR2_CheckFlag = GetTemplateTokenNumber(Target, TP, 2, 0);
276         if (QR2_CheckFlag == 0)
277                 LogTemplateError(Target, "Conditional", ERR_PARM1, TP,
278                                  "requires one of the #\"QR2*\"- defines or an integer flag 0 is invalid!");
279
280         
281         if (WCC == NULL)
282                 return 0;
283
284         if ((TP->Tokens->Params[2]->MaskBy == eOR) ||
285             (TP->Tokens->Params[2]->MaskBy == eNO))
286                 return (WCC->CurRoom.QRFlags2 & QR2_CheckFlag) != 0;
287         else
288                 return (WCC->CurRoom.QRFlags2 & QR2_CheckFlag) == QR2_CheckFlag;
289 }
290 int ConditionalRoomHas_QRFlag2(StrBuf *Target, WCTemplputParams *TP)
291 {
292         long QR2_CheckFlag;
293         folder *Folder = (folder *)(TP->Context);
294
295         QR2_CheckFlag = GetTemplateTokenNumber(Target, TP, 2, 0);
296         if (QR2_CheckFlag == 0)
297                 LogTemplateError(Target, "Conditional", ERR_PARM1, TP,
298                                  "requires one of the #\"QR2*\"- defines or an integer flag 0 is invalid!");
299         return ((Folder->QRFlags2 & QR2_CheckFlag) != 0);
300 }
301
302 int ConditionalRoomHas_UAFlag(StrBuf *Target, WCTemplputParams *TP)
303 {
304         folder *Folder = (folder *)(TP->Context);
305         long UA_CheckFlag;
306                 
307         UA_CheckFlag = GetTemplateTokenNumber(Target, TP, 2, 0);
308         if (UA_CheckFlag == 0)
309                 LogTemplateError(Target, "Conditional", ERR_PARM1, TP,
310                                  "requires one of the #\"UA_*\"- defines or an integer flag 0 is invalid!");
311
312         return ((Folder->RAFlags & UA_CheckFlag) != 0);
313 }
314
315
316
317
318
319 void tmplput_ROOM_ACL(StrBuf *Target, WCTemplputParams *TP) 
320 {
321         folder *Folder = (folder *)CTX;
322
323         StrBufAppendPrintf(Target, "%ld", Folder->RAFlags, 0);
324 }
325
326
327
328 void tmplput_ROOM_RAFLAGS(StrBuf *Target, WCTemplputParams *TP) 
329 {
330         folder *Folder = (folder *)(TP->Context);
331         StrBufAppendPrintf(Target, "%d", Folder->RAFlags);
332 }
333
334
335 void tmplput_ThisRoomAide(StrBuf *Target, WCTemplputParams *TP) 
336 {
337         wcsession *WCC = WC;
338
339         LoadRoomAide();
340
341         StrBufAppendTemplate(Target, TP, WCC->CurRoom.RoomAide, 0);
342 }
343 int ConditionalRoomAide(StrBuf *Target, WCTemplputParams *TP)
344 {
345         wcsession *WCC = WC;
346         return (WCC != NULL)? 
347                 ((WCC->CurRoom.RAFlags & UA_ADMINALLOWED) != 0) : 0;
348 }
349
350 int ConditionalRoomAcessDelete(StrBuf *Target, WCTemplputParams *TP)
351 {
352         wcsession *WCC = WC;
353         return (WCC == NULL)? 0 : 
354                 ( ((WCC->CurRoom.RAFlags & UA_ADMINALLOWED) != 0) ||
355                    (WCC->CurRoom.is_inbox) || 
356                    (WCC->CurRoom.QRFlags2 & QR2_COLLABDEL) );
357 }
358
359
360
361 int ConditionalHaveRoomeditRights(StrBuf *Target, WCTemplputParams *TP)
362 {
363         wcsession *WCC = WC;
364
365         return ( (WCC!= NULL) && 
366                  ((WCC->axlevel >= 6) || 
367                   ((WCC->CurRoom.RAFlags & UA_ADMINALLOWED) != 0) ||
368                   (WCC->CurRoom.is_inbox) ));
369 }
370 void tmplput_ThisRoomPass(StrBuf *Target, WCTemplputParams *TP) 
371 {
372         wcsession *WCC = WC;
373
374         LoadRoomXA();
375
376         StrBufAppendTemplate(Target, TP, WCC->CurRoom.XAPass, 0);
377 }
378
379
380
381
382
383
384 void tmplput_ThisRoom_nNewMessages(StrBuf *Target, WCTemplputParams *TP) 
385 {
386         wcsession *WCC = WC;
387
388         LoadRoomXA();
389
390         StrBufAppendPrintf(Target, "%d", WCC->CurRoom.nNewMessages);
391 }
392
393 void tmplput_ThisRoom_nTotalMessages(StrBuf *Target, WCTemplputParams *TP) 
394 {
395         wcsession *WCC = WC;
396
397         LoadRoomXA();
398
399         StrBufAppendPrintf(Target, "%d", WCC->CurRoom.nTotalMessages);
400 }
401
402
403
404
405
406
407 void tmplput_ThisRoomOrder(StrBuf *Target, WCTemplputParams *TP) 
408 {
409         wcsession *WCC = WC;
410
411         LoadRoomXA();
412
413         StrBufAppendPrintf(Target, "%d", WCC->CurRoom.Order);
414 }
415 int ConditionalThisRoomOrder(StrBuf *Target, WCTemplputParams *TP)
416 {
417         wcsession *WCC = WC;
418         long CheckThis;
419
420         if (WCC == NULL)
421                 return 0;
422
423         LoadRoomXA();
424
425         CheckThis = GetTemplateTokenNumber(Target, TP, 2, 0);
426         return CheckThis == WCC->CurRoom.Order;
427 }
428 void tmplput_ROOM_LISTORDER(StrBuf *Target, WCTemplputParams *TP) 
429 {
430         folder *Folder = (folder *)CTX;
431         StrBufAppendPrintf(Target, "%d", Folder->Order);
432 }
433
434
435
436
437
438 int ConditionalThisRoomXHavePic(StrBuf *Target, WCTemplputParams *TP)
439 {
440         wcsession *WCC = WC;
441         
442         if (WCC == NULL)
443                 return 0;
444
445         LoadXRoomPic();
446         return WCC->CurRoom.XHaveRoomPic == 1;
447 }
448
449
450 int ConditionalThisRoomXHaveInfoText(StrBuf *Target, WCTemplputParams *TP)
451 {
452         wcsession *WCC = WC;
453         
454         if (WCC == NULL)
455                 return 0;
456
457         LoadXRoomInfoText();
458         return (StrLength(WCC->CurRoom.XInfoText)>0);
459 }
460 void tmplput_ThisRoomInfoText(StrBuf *Target, WCTemplputParams *TP) 
461 {
462         wcsession *WCC = WC;
463
464         LoadXRoomInfoText();
465
466         StrBufAppendTemplate(Target, TP, WCC->CurRoom.XAPass, 1);
467 }
468
469
470
471
472
473
474
475
476 void tmplput_ROOM_LASTCHANGE(StrBuf *Target, WCTemplputParams *TP) 
477 {
478         folder *Folder = (folder *)CTX;
479         StrBufAppendPrintf(Target, "%d", Folder->lastchange);
480 }
481
482
483
484
485
486
487
488
489 void tmplput_ThisRoomDirectory(StrBuf *Target, WCTemplputParams *TP) 
490 {
491         wcsession *WCC = WC;
492
493         LoadRoomXA();
494
495         StrBufAppendTemplate(Target, TP, WCC->CurRoom.Directory, 0);
496 }
497 void tmplput_ThisRoomXNFiles(StrBuf *Target, WCTemplputParams *TP) 
498 {
499         wcsession *WCC = WC;
500
501         LoadXRoomXCountFiles();
502
503         StrBufAppendPrintf(Target, "%d", WCC->CurRoom.XDownloadCount);
504 }
505
506 void tmplput_ThisRoomX_FileString(StrBuf *Target, WCTemplputParams *TP) 
507 {
508         wcsession *WCC = WC;
509
510         LoadXRoomXCountFiles();
511
512         if (WCC->CurRoom.XDownloadCount == 1)
513                 StrBufAppendBufPlain(Target, _("file"), -1, 0);
514         else
515                 StrBufAppendBufPlain(Target, _("files"), -1, 0);
516 }
517
518
519 void 
520 InitModule_ROOMTOKENS
521 (void)
522 {
523         RegisterNamespace("ROOMBANNER", 0, 1, tmplput_roombanner, NULL, CTX_NONE);
524
525         RegisterNamespace("FLOOR:ID", 0, 0, tmplput_FLOOR_ID, NULL, CTX_FLOORS);
526         RegisterNamespace("ROOM:INFO:FLOORID", 0, 1, tmplput_ROOM_FLOORID, NULL, CTX_ROOMS);
527         RegisterNamespace("ROOM:INFO:FLOOR:ID", 0, 0, tmplput_ROOM_FLOOR_ID, NULL, CTX_ROOMS);
528
529         RegisterNamespace("FLOOR:NAME", 0, 1, tmplput_FLOOR_NAME, NULL, CTX_FLOORS);
530         RegisterNamespace("ROOM:INFO:FLOOR:NAME", 0, 1, tmplput_ROOM_FLOOR_NAME, NULL, CTX_ROOMS);
531         RegisterNamespace("THISROOM:FLOOR:NAME", 0, 1, tmplput_ThisRoomFloorName, NULL, CTX_NONE);
532
533         RegisterNamespace("FLOOR:NROOMS", 0, 0, tmplput_FLOOR_NROOMS, NULL, CTX_FLOORS);
534         RegisterNamespace("ROOM:INFO:FLOOR:NROOMS", 0, 0, tmplput_ROOM_FLOOR_NROOMS, NULL, CTX_ROOMS);
535
536         RegisterConditional(HKEY("COND:FLOOR:ISSUBROOM"), 0, ConditionalFloorIsSUBROOM, CTX_FLOORS);
537         RegisterConditional(HKEY("COND:FLOOR:NROOMS"), 1, ConditionalFloorHaveNRooms, CTX_FLOORS);
538         RegisterConditional(HKEY("COND:ROOM:REST:ISSUBFLOOR"), 0, ConditionalFloorIsRESTSubFloor, CTX_FLOORS);
539         RegisterConditional(HKEY("COND:FLOOR:ISVIRTUAL"), 0, ConditionalFloorIsVirtual, CTX_FLOORS);
540
541         /**** Room... ******/
542         /**** Name ******/
543         RegisterNamespace("ROOMNAME", 0, 1, tmplput_RoomName, NULL, CTX_NONE);
544         RegisterNamespace("CURRENT_ROOM", 0, 1, tmplput_current_room, NULL, CTX_NONE);
545         RegisterNamespace("ROOM:INFO:NAME", 0, 1, tmplput_ROOM_NAME, NULL, CTX_ROOMS);
546         RegisterNamespace("ROOM:INFO:PRINT_NAME", 0, 1, tmplput_ROOM_NAME, NULL, CTX_NONE);
547         RegisterNamespace("ROOM:INFO:BASENAME", 0, 1, tmplput_ROOM_BASENAME, NULL, CTX_ROOMS);
548         RegisterNamespace("ROOM:INFO:LEVELNTIMES", 1, 2, tmplput_ROOM_LEVEL_N_TIMES, NULL, CTX_ROOMS);
549         RegisterConditional(HKEY("COND:ROOM:INFO:IS_INBOX"), 0, ConditionalRoomIsInbox, CTX_ROOMS);
550
551         /****** Properties ******/
552         RegisterNamespace("ROOM:INFO:QRFLAGS", 0, 1, tmplput_ROOM_QRFLAGS, NULL, CTX_ROOMS);
553         RegisterConditional(HKEY("COND:THISROOM:FLAG:QR"), 0, ConditionalThisRoomHas_QRFlag, CTX_NONE);
554         RegisterConditional(HKEY("COND:ROOM:FLAG:QR"), 0, ConditionalRoomHas_QRFlag, CTX_ROOMS);
555
556         RegisterConditional(HKEY("COND:THISROOM:FLAG:QR2"), 0, ConditionalThisRoomHas_QRFlag2, CTX_NONE);
557         RegisterConditional(HKEY("COND:ROOM:FLAG:QR2"), 0, ConditionalRoomHas_QRFlag2, CTX_ROOMS);
558
559         RegisterConditional(HKEY("COND:ROOM:FLAG:UA"), 0, ConditionalRoomHas_UAFlag, CTX_ROOMS);
560         RegisterNamespace("ROOM:INFO:RAFLAGS", 0, 1, tmplput_ROOM_RAFLAGS, NULL, CTX_ROOMS);
561
562
563         RegisterNamespace("ROOM:INFO:LISTORDER", 0, 1, tmplput_ROOM_LISTORDER, NULL, CTX_ROOMS);
564         RegisterNamespace("THISROOM:ORDER", 0, 0, tmplput_ThisRoomOrder, NULL, CTX_NONE);
565         RegisterConditional(HKEY("COND:THISROOM:ORDER"), 0, ConditionalThisRoomOrder, CTX_NONE);
566
567         RegisterNamespace("ROOM:INFO:LASTCHANGE", 0, 1, tmplput_ROOM_LASTCHANGE, NULL, CTX_ROOMS);
568
569         RegisterNamespace("THISROOM:MSGS:NEW", 0, 0, tmplput_ThisRoom_nNewMessages, NULL, CTX_NONE);
570         RegisterNamespace("THISROOM:MSGS:TOTAL", 0, 0, tmplput_ThisRoom_nTotalMessages, NULL, CTX_NONE);
571
572         RegisterNamespace("THISROOM:PASS", 0, 1, tmplput_ThisRoomPass, NULL, CTX_NONE);
573         RegisterNamespace("THISROOM:AIDE", 0, 1, tmplput_ThisRoomAide, NULL, CTX_NONE);
574         RegisterConditional(HKEY("COND:ROOMAIDE"), 2, ConditionalRoomAide, CTX_NONE);
575         RegisterConditional(HKEY("COND:ACCESS:DELETE"), 2, ConditionalRoomAcessDelete, CTX_NONE);
576         RegisterConditional(HKEY("COND:ROOM:EDITACCESS"), 0, ConditionalHaveRoomeditRights, CTX_NONE);
577
578         RegisterConditional(HKEY("COND:THISROOM:HAVE_PIC"), 0, ConditionalThisRoomXHavePic, CTX_NONE);
579
580         RegisterNamespace("THISROOM:INFOTEXT", 1, 2, tmplput_ThisRoomInfoText, NULL, CTX_NONE);
581         RegisterConditional(HKEY("COND:THISROOM:HAVE_INFOTEXT"), 0, ConditionalThisRoomXHaveInfoText, CTX_NONE);
582
583         RegisterNamespace("THISROOM:FILES:N", 0, 1, tmplput_ThisRoomXNFiles, NULL, CTX_NONE);
584         RegisterNamespace("THISROOM:FILES:STR", 0, 1, tmplput_ThisRoomX_FileString, NULL, CTX_NONE);
585         RegisterNamespace("THISROOM:DIRECTORY", 0, 1, tmplput_ThisRoomDirectory, NULL, CTX_NONE);
586
587
588
589
590
591
592         RegisterNamespace("ROOM:INFO:ACL", 0, 1, tmplput_ROOM_ACL, NULL, CTX_ROOMS);
593 }