]> 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 f9b0fc70d6e7e063bb8735fe12f6249b9fc23e7e..f53e3bfb1923090af95eae0c7a2530d0a1826ab0 100644 (file)
@@ -1,8 +1,7 @@
 /*
- * Citadel/UX  
- *
- * citadel.c - Main source file.
  * $Id$
+ *
+ * Main source module for the client program.
  */
 
 #include "sysdep.h"
@@ -34,7 +33,6 @@
 #include "ipc.h"
 #include "client_chat.h"
 #include "client_passwords.h"
-#include "client_icq.h"
 #include "citadel_decls.h"
 #include "tools.h"
 #ifndef HAVE_SNPRINTF
@@ -129,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...
  */
@@ -195,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")) {
@@ -217,7 +200,6 @@ void userlist(char *patn)
 
                }
        }
-       sttybbs(SB_NO_INTR);
        pprintf("\n");
 }
 
@@ -1240,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;
@@ -1374,10 +1390,6 @@ PWOK:    printf("%s\nAccess level: %d (%s)\nUser #%ld / Call #%d\n",
                                page_user();
                                break;
 
-                       case 81:
-                               setup_icq();
-                               break;
-
                        }       /* end switch */
        } while (termn8 == 0);