X-Git-Url: https://code.citadel.org/?p=citadel.git;a=blobdiff_plain;f=citadel%2Fmodules%2Fctdlproto%2Fserv_syscmds.c;h=28e2ea60657fd155c10b82f2d6785f007846eca6;hp=8783cc291d55ace6ae2300fce9a42766e81dfe1d;hb=29054912680f4f66a84ac947de38b8e99a1c4d80;hpb=068d33e5d8569b2c4a2c8582178427892b0a8dee diff --git a/citadel/modules/ctdlproto/serv_syscmds.c b/citadel/modules/ctdlproto/serv_syscmds.c index 8783cc291..28e2ea606 100644 --- a/citadel/modules/ctdlproto/serv_syscmds.c +++ b/citadel/modules/ctdlproto/serv_syscmds.c @@ -1,17 +1,14 @@ - -/* - * Main source module for the Citadel server - * - * Copyright (c) 1987-2018 by the citadel.org team - * - * This program is open source software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License, version 3. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - */ +// System management commands for Citadel server +// +// Copyright (c) 1987-2021 by the citadel.org team +// +// This program is open source software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License, version 3. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. #include #include @@ -20,16 +17,13 @@ #include "ctdl_module.h" -/* - * Shut down the server - */ +// Shut down or restart the server void cmd_down(char *argbuf) { char *Reply ="%d Shutting down server. Goodbye.\n"; if (CtdlAccessCheck(ac_aide)) return; - if (!IsEmptyStr(argbuf)) - { + if (!IsEmptyStr(argbuf)) { int state = CIT_OK; restart_server = extract_int(argbuf, 0); @@ -46,11 +40,8 @@ void cmd_down(char *argbuf) { } -/* - * Halt the server without exiting the server process. - */ +// Halt the server without exiting the server process. void cmd_halt(char *argbuf) { - if (CtdlAccessCheck(ac_aide)) return; cprintf("%d Halting server. Goodbye.\n", CIT_OK); @@ -59,11 +50,8 @@ void cmd_halt(char *argbuf) { } -/* - * Schedule or cancel a server shutdown - */ -void cmd_scdn(char *argbuf) -{ +// Schedule or cancel a server shutdown +void cmd_scdn(char *argbuf) { int new_state; int state = CIT_OK; char *Reply = "%d %d\n"; @@ -83,9 +71,9 @@ void cmd_scdn(char *argbuf) } -/*****************************************************************************/ -/* MODULE INITIALIZATION STUFF */ -/*****************************************************************************/ +// **************************************************************************** +// * MODULE INITIALIZATION STUFF * +// **************************************************************************** CTDL_MODULE_INIT(syscmd) { @@ -94,6 +82,6 @@ CTDL_MODULE_INIT(syscmd) CtdlRegisterProtoHook(cmd_halt, "HALT", "halt the server without exiting the server process"); CtdlRegisterProtoHook(cmd_scdn, "SCDN", "schedule or cancel a server shutdown"); } - /* return our id for the Log */ + // return our id for the log return "syscmd"; }