]> code.citadel.org Git - citadel.git/blobdiff - citadel/citadel.c
* Added .ATN (DOWN) and .ATS (SCDN 1) commands to the client
[citadel.git] / citadel / citadel.c
index 706558fee6b30f907a795e8a4938f76254315e1f..f53e3bfb1923090af95eae0c7a2530d0a1826ab0 100644 (file)
@@ -127,19 +127,6 @@ void logoff(int code)
 
 
 
-/*
- * We handle "next" and "stop" much differently than in earlier versions.
- * The signal catching routine simply sets a flag and returns.
- */
-void sighandler(int which_sig)
-{
-       signal(SIGINT, SIG_IGN);
-       signal(SIGQUIT, SIG_IGN);
-       sigcaught = which_sig;
-       return;
-}
-
-
 /*
  * signal catching function for hangups...
  */
@@ -193,8 +180,6 @@ void userlist(char *patn)
                pprintf("%s\n", &buf[4]);
                return;
        }
-       sigcaught = 0;
-       sttybbs(SB_YES_INTR);
        pprintf("       User Name           Num  L  LastCall  Calls Posts\n");
        pprintf("------------------------- ----- - ---------- ----- -----\n");
        while (serv_gets(buf), strcmp(buf, "000")) {
@@ -215,7 +200,6 @@ void userlist(char *patn)
 
                }
        }
-       sttybbs(SB_NO_INTR);
        pprintf("\n");
 }
 
@@ -1238,6 +1222,40 @@ PWOK:    printf("%s\nAccess level: %d (%s)\nUser #%ld / Call #%d\n",
                                }
                                break;
 
+                       case 85:
+                               printf("All users will be disconnected!  "
+                                       "Really terminate the server? ");
+                               if (yesno() == 1) {
+                                       serv_puts("DOWN");
+                                       serv_gets(aaa);
+                                       printf("%s\n", &aaa[4]);
+                                       if (aaa[0]=='2') {
+                                               updatels();
+                                               a = 0;
+                                               termn8 = 1;
+                                       }
+                               }
+
+                       case 86:
+                               printf("Do you really want to schedule a "
+                                       "server shutdown? ");
+                               if (yesno() == 1) {
+                                       serv_puts("SCDN 1");
+                                       serv_gets(aaa);
+                                       if (aaa[0]=='2') {
+                                               if (atoi(&aaa[4])) {
+                                                       printf(
+"The Citadel server will terminate when all users are logged off.\n"
+                                                               );
+                                               }
+                                               else {
+                                                       printf(
+"The Citadel server will not terminate.\n"
+                                                               );
+                                               }
+                                       }
+                               }
+
                        case 6:
                                gotonext();
                                break;