]> code.citadel.org Git - citadel.git/blobdiff - citadel/client_chat.c
* Changed the comments at the beginning of each file to a consistent format
[citadel.git] / citadel / client_chat.c
index 97805d157087853e6f11b13d9cd2ec7b96351315..658e9c13b0b6a365b4ad5925364dc4f0f4f8a072 100644 (file)
@@ -1,11 +1,9 @@
 /*
- * Citadel/UX
- *
- * client_chat.c  --  front end for chat mode
- *                    (the "single process" version - no more fork() anymore)
- *
  * $Id$
  *
+ * front end for chat mode
+ * (the "single process" version - no more fork() anymore)
+ *
  */
 
 #include "sysdep.h"
@@ -40,7 +38,6 @@
 
 extern struct CtdlServInfo serv_info;
 extern char temp[];
-void citedit(FILE *fp, long int base_pos);
 void getline(char *, int);
 
 void chatmode(void) {
@@ -174,7 +171,7 @@ RCL:            if (send_complete_line) {
                           printf("Got room %s\n", c_room);
                        }
                           
-                       if (strucmp(c_text,"NOOP")) {
+                       if (strcasecmp(c_text,"NOOP")) {
                                if (!strcmp(c_user, fullname)) {
                                        color(BRIGHT_YELLOW);
                                        }
@@ -274,3 +271,32 @@ void page_user() {
 
 
 
+
+void quiet_mode(void) {
+       int qstate;
+       char buf[256];
+
+       serv_puts("DEXP 2");
+       serv_gets(buf);
+       if (buf[0]!='2') {
+               printf("%s\n", &buf[4]);
+               return;
+       }
+       qstate = atoi(&buf[4]);
+       if (qstate == 0) qstate = 1;
+       else qstate = 0;
+       sprintf(buf, "DEXP %d", qstate);
+       serv_puts(buf);
+       serv_gets(buf);
+       if (buf[0]!='2') {
+               printf("%s\n", &buf[4]);
+               return;
+       }
+       qstate = atoi(&buf[4]);
+       if (qstate) {
+               printf("Quiet mode enabled (no other users may page you)\n");
+       }
+       else {
+               printf("Quiet mode disabled (other users may page you)\n");
+       }
+}