+void NodeCfgSubst(StrBuf *TemplBuffer, void *vContext, WCTemplateToken *Token)
+{
+ NodeConf *Node= (NodeConf*)vContext;
+
+ SVPutBuf("CFG:IGNET:NODE", Node->NodeName, 1);
+ SVPutBuf("CFG:IGNET:SECRET", Node->Secret, 1);
+ SVPutBuf("CFG:IGNET:HOST", Node->Host, 1);
+ SVPutBuf("CFG:IGNET:PORT", Node->Port, 1);
+}
+
+
+void save_net_conf(HashList *Nodelist)
+{
+ char buf[SIZ];
+ StrBuf *Buf;
+ HashPos *where;
+ void *vNode;
+ NodeConf *Node;
+ const char *Key;
+ long KeyLen;
+
+ serv_puts("CONF putsys|application/x-citadel-ignet-config");
+ serv_getln(buf, sizeof buf);
+ if (buf[0] == '4') {
+ if ((Nodelist != NULL) && (GetCount(Nodelist) > 0)) {
+ where = GetNewHashPos();
+ Buf = NewStrBuf();
+ while (GetNextHashPos(Nodelist, where, &KeyLen, &Key, &vNode)) {
+ Node = (NodeConf*) vNode;
+ if (Node->DeleteMe==0) {
+ SerializeNode(Node, Buf);
+ serv_putbuf(Buf);
+ }
+ }
+ FreeStrBuf(&Buf);
+ }
+ serv_puts("000");
+ }
+}
+
+
+
+/*----------------------------------------------------------------------*/
+/* WEB Handlers */
+/*----------------------------------------------------------------------*/
+
+
+
+/**
+ * \brief edit a network node
+ */