#include "webcit.h"
#include "webserver.h"
+
HashList *GetWhoKnowsHash(StrBuf *Target, WCTemplputParams *TP)
{
- wcsession *WCC = WC;
StrBuf *Line;
StrBuf *Token;
long State;
HashList *Whok = NULL;
int Done = 0;
- int n;
+ int n = 0;
serv_puts("WHOK");
Line = NewStrBuf();
}
}
else if (State == 550)
- StrBufAppendBufPlain(WCC->ImportantMsg,
- _("Higher access is required to access this function."), -1, 0);
+ AppendImportantMessage(_("Higher access is required to access this function."), -1);
FreeStrBuf(&Line);
return WCC->Rooms;
}
+HashList *GetRoomListHashLPRM(StrBuf *Target, WCTemplputParams *TP)
+{
+ serv_puts("LPRM");
+ return GetRoomListHash(Target, TP);
+}
+
void FlushIgnetCfgs(folder *room)
{
}
}
else if (State == 550)
- StrBufAppendBufPlain(WCC->ImportantMsg,
- _("Higher access is required to access this function."), -1, 0);
+ AppendImportantMessage(_("Higher access is required to access this function."), -1);
+ FreeStrBuf(&Line);
+ FreeStrBuf(&Token);
return WCC->CurRoom.IgnetCfgs[WantThisOne];
}
int ConditionalRoomIsRESTSubRoom(StrBuf *Target, WCTemplputParams *TP)
{
wcsession *WCC = WC;
- folder *Folder = (folder *)CTX;
+ folder *Folder = (folder *)CTX(CTX_ROOMS);
HashPos *it;
StrBuf * Dir;
void *vDir;
InitModule_ROOMLIST
(void)
{
+ /* we duplicate this, just to be shure its already done. */
+ RegisterCTX(CTX_ROOMS);
+ RegisterCTX(CTX_FLOORS);
RegisterIterator("ITERATE:THISROOM:WHO_KNOWS", 0, NULL, GetWhoKnowsHash, NULL, DeleteHash, CTX_STRBUF, CTX_NONE, IT_NOFLAG);
RegisterIterator("ITERATE:THISROOM:GNET", 1, NULL, GetNetConfigHash, NULL, NULL, CTX_STRBUFARR, CTX_NONE, IT_NOFLAG);
RegisterIterator("LFLR", 0, NULL, GetFloorListHash, NULL, NULL, CTX_FLOORS, CTX_NONE, IT_FLAG_DETECT_GROUPCHANGE);
RegisterIterator("LKRA", 0, NULL, GetRoomListHashLKRA, NULL, NULL, CTX_ROOMS, CTX_NONE, IT_FLAG_DETECT_GROUPCHANGE);
RegisterIterator("LZRM", 0, NULL, GetZappedRoomListHash, NULL, DeleteHash, CTX_ROOMS, CTX_NONE, IT_FLAG_DETECT_GROUPCHANGE);
+ RegisterIterator("LPRM", 0, NULL, GetRoomListHashLPRM, NULL, DeleteHash, CTX_ROOMS, CTX_NONE, IT_FLAG_DETECT_GROUPCHANGE);
+
+
+
- RegisterConditional(HKEY("COND:ROOM:REST:ISSUBROOM"), 0, ConditionalRoomIsRESTSubRoom, CTX_ROOMS);
+ RegisterConditional("COND:ROOM:REST:ISSUBROOM", 0, ConditionalRoomIsRESTSubRoom, CTX_ROOMS);
RegisterSortFunc(HKEY("byfloorroom"),
NULL, 0,