]> code.citadel.org Git - citadel.git/blobdiff - citadel/serv_chat.c
* serv_chat.c: Differentiate when a user does not exist when paging users.
[citadel.git] / citadel / serv_chat.c
index 9baeaac74d6aecd4bf0f253aaa66b1b6b7468734..a88f97258a134c36215c45c919410749e6985c59 100644 (file)
@@ -688,9 +688,13 @@ void cmd_sexp(char *argbuf)
        if (!strcmp(x_msg, "-")) {
                message_sent = PerformXmsgHooks(lun, x_user, "");
                if (message_sent == 0) {
-                       cprintf("%d '%s' is not logged in "
-                               "or is not accepting pages.\n",
-                               ERROR + NO_SUCH_USER, x_user);
+                       if (getuser(NULL, x_user))
+                               cprintf("%d '%s' does not exist.\n",
+                                               ERROR + NO_SUCH_USER, x_user);
+                       else
+                               cprintf("%d '%s' is not logged in "
+                                               "or is not accepting pages.\n",
+                                               ERROR + RESOURCE_NOT_OPEN, x_user);
                        return;
                }
                cprintf("%d Transmit message (will deliver to %d users)\n",
@@ -721,9 +725,13 @@ void cmd_sexp(char *argbuf)
                                cprintf(" to %d users", message_sent);
                        cprintf(".\n");
                } else {
-                       cprintf("%d '%s' is not logged in "
-                               "or is not accepting pages.\n",
-                               ERROR + NO_SUCH_USER, x_user);
+                       if (getuser(NULL, x_user))
+                               cprintf("%d '%s' does not exist.\n",
+                                               ERROR + NO_SUCH_USER, x_user);
+                       else
+                               cprintf("%d '%s' is not logged in "
+                                               "or is not accepting pages.\n",
+                                               ERROR + RESOURCE_NOT_OPEN, x_user);
                }