From: Art Cancro Date: Sun, 5 Aug 2001 23:54:14 +0000 (+0000) Subject: * prep for new network node infrastructure X-Git-Tag: v7.86~6814 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=06b95e92df305d6f02851b059b41cc8880a5f9ca;p=citadel.git * prep for new network node infrastructure --- diff --git a/citadel/ChangeLog b/citadel/ChangeLog index 654de413e..97e46eb95 100644 --- a/citadel/ChangeLog +++ b/citadel/ChangeLog @@ -1,4 +1,7 @@ $Log$ + Revision 580.19 2001/08/05 23:54:14 ajc + * prep for new network node infrastructure + Revision 580.18 2001/08/03 16:53:21 ajc * Added some more "break" statements to the main switch..case loop in citadel.c where they were needed. @@ -2656,3 +2659,4 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant Fri Jul 10 1998 Art Cancro * Initial CVS import + diff --git a/citadel/control.c b/citadel/control.c index 5a154b14f..94c3ec8c4 100644 --- a/citadel/control.c +++ b/citadel/control.c @@ -36,6 +36,7 @@ #include "support.h" #include "config.h" #include "msgbase.h" +#include "citserver.h" #include "tools.h" #include "room_ops.h" @@ -143,16 +144,7 @@ void cmd_conf(char *argbuf) { char *confptr; char confname[SIZ]; - if (!(CC->logged_in)) { - cprintf("%d Not logged in.\n",ERROR+NOT_LOGGED_IN); - return; - } - - if (CC->usersupp.axlevel < 6) { - cprintf("%d Higher access required.\n", - ERROR+HIGHER_ACCESS_REQUIRED); - return; - } + if (CtdlAccessCheck(ac_aide)) return; extract(cmd, argbuf, 0); if (!strcasecmp(cmd, "GET")) { diff --git a/citadel/serv_network.c b/citadel/serv_network.c index 6aa5d9481..9c428c8c2 100644 --- a/citadel/serv_network.c +++ b/citadel/serv_network.c @@ -340,10 +340,43 @@ void network_do_queue(void) { } + +/* + * Add, change, or delete network nodes + */ +void cmd_node(char *argbuf) { + char command[SIZ]; + char nodename[SIZ]; + char secret[SIZ]; + FILE *fp; + + if (CtdlAccessCheck(ac_aide)) return; + + extract(command, argbuf, 0); + + if (!strcasecmp(command, "add")) { + cprintf("%d bloopyblard\n", ERROR); + return; + } + + else { + cprintf("%d Illegal option(s) specified.\n", + ERROR+ILLEGAL_VALUE); + return; + } +} + + + + +/* + * Module entry point + */ char *Dynamic_Module_Init(void) { CtdlRegisterProtoHook(cmd_gnet, "GNET", "Get network config"); CtdlRegisterProtoHook(cmd_snet, "SNET", "Get network config"); + CtdlRegisterProtoHook(cmd_node, "NODE", "Modify network nodes"); CtdlRegisterSessionHook(network_do_queue, EVT_TIMER); return "$Id$"; } diff --git a/citadel/serv_network.h b/citadel/serv_network.h index 3fed171cf..d01639db9 100644 --- a/citadel/serv_network.h +++ b/citadel/serv_network.h @@ -1,4 +1,3 @@ - struct namelist { struct namelist *next; char name[SIZ];