[srvx-commits] CVS: services/src opserv.c,1.347,1.348
Brought to you by:
entrope
From: Entrope <en...@us...> - 2003-10-28 05:20:58
|
Update of /cvsroot/srvx/services/src In directory sc8-pr-cvs1:/tmp/cvs-serv1676/src Modified Files: opserv.c Log Message: send a response to the user when ?unjupe succeeds Index: opserv.c =================================================================== RCS file: /cvsroot/srvx/services/src/opserv.c,v retrieving revision 1.347 retrieving revision 1.348 diff -C2 -r1.347 -r1.348 *** opserv.c 20 Oct 2003 16:56:55 -0000 1.347 --- opserv.c 28 Oct 2003 04:55:56 -0000 1.348 *************** *** 227,230 **** --- 227,231 ---- #define OSMSG_SERVER_JUPED "Added new jupe server %s." #define OSMSG_SERVER_NOT_JUPE "That server is not a juped server." + #define OSMSG_SERVER_UNJUPED "Server jupe removed." #define OSMSG_MODLOG_FAILED "Logging modification failed." #define OSMSG_MODLOG_PASSED "Logging modification succeeded." *************** *** 664,680 **** srv = GetServerH(argv[1]); ! if (srv) { ! if (strncmp(srv->description, "JUPE", 4)) { ! opserv_notice(user, OSMSG_SERVER_NOT_JUPE); ! return 0; ! } else { ! reason = (argc > 2) ? unsplit_string(argv+2, argc-2, NULL) : "Unjuping server"; ! DelServer(srv, 1, reason); ! return 1; ! } ! } else { ! opserv_notice(user, MSG_SERVER_UNKNOWN, argv[1]); return 0; } } --- 665,680 ---- srv = GetServerH(argv[1]); ! if (!srv) { ! reply(MSG_SERVER_UNKNOWN, argv[1]); return 0; } + if (strncmp(srv->description, "JUPE", 4)) { + reply(OSMSG_SERVER_NOT_JUPE); + return 0; + } + reason = (argc > 2) ? unsplit_string(argv+2, argc-2, NULL) : "Unjuping server"; + DelServer(srv, 1, reason); + reply(OSMSG_SERVER_UNJUPED); + return 1; } |