+extern struct configlen configlen;
+
+
+#define NODENAME config.c_nodename
+#define FQDN config.c_fqdn
+#define CTDLUID config.c_ctdluid
+#define CREATAIDE config.c_creataide
+#define REGISCALL config.c_regiscall
+#define TWITDETECT config.c_twitdetect
+#define TWITROOM config.c_twitroom
+#define RESTRICT_INTERNET config.c_restrict
+
+#define CFG_KEY(which) config.which, configlen.which
+
+typedef void (*CfgLineParser)(const CfgLineType *ThisOne, StrBuf *Line, const char *LinePos, OneRoomNetCfg *rncfg);
+typedef void (*CfgLineSerializer)(const CfgLineType *ThisOne, StrBuf *OuptputBuffer, OneRoomNetCfg *rncfg, RoomNetCfgLine *data);
+typedef void (*CfgLineDeAllocator)(const CfgLineType *ThisOne, RoomNetCfgLine **data);
+
+struct CfgLineType {
+ RoomNetCfg C;
+ CfgLineParser Parser;
+ CfgLineSerializer Serializer;
+ CfgLineDeAllocator DeAllocator;
+ ConstStr Str;
+ int IsSingleLine;
+ int nSegments;
+};
+
+struct RoomNetCfgLine {
+ RoomNetCfgLine *next;
+ int nValues;
+ StrBuf **Value;
+};
+
+struct OneRoomNetCfg {
+ long lastsent;
+ long changed;
+ StrBuf *Sender;
+ StrBuf *RoomInfo;
+ RoomNetCfgLine *NetConfigs[maxRoomNetCfg];
+ StrBuf *misc;
+};
+
+
+#define CtdlREGISTERRoomCfgType(a, p, uniq, nSegs, s, d) RegisterRoomCfgType(#a, sizeof(#a) - 1, a, p, uniq, nSegs, s, d);
+void RegisterRoomCfgType(const char* Name, long len, RoomNetCfg eCfg, CfgLineParser p, int uniq, int nSegments, CfgLineSerializer s, CfgLineDeAllocator d);
+void ParseGeneric(const CfgLineType *ThisOne, StrBuf *Line, const char *LinePos, OneRoomNetCfg *sc);
+void SerializeGeneric(const CfgLineType *ThisOne, StrBuf *OutputBuffer, OneRoomNetCfg *sc, RoomNetCfgLine *data);
+void DeleteGenericCfgLine(const CfgLineType *ThisOne, RoomNetCfgLine **data);
+RoomNetCfgLine *DuplicateOneGenericCfgLine(const RoomNetCfgLine *data);
+void AddRoomCfgLine(OneRoomNetCfg *OneRNCfg, struct ctdlroom *qrbuf, RoomNetCfg LineType, RoomNetCfgLine *Line);
+
+OneRoomNetCfg* CtdlGetNetCfgForRoom(long QRNumber);
+
+typedef struct _nodeconf {
+ int DeleteMe;
+ StrBuf *NodeName;
+ StrBuf *Secret;
+ StrBuf *Host;
+ StrBuf *Port;
+}CtdlNodeConf;
+
+HashList* CtdlLoadIgNetCfg(void);
+
+
+int CtdlNetconfigCheckRoomaccess(char *errmsgbuf,
+ size_t n,
+ const char* RemoteIdentifier);