]> git.pond.sub.org Git - empserver/blobdiff - src/lib/commands/deli.c
Update copyright notice
[empserver] / src / lib / commands / deli.c
index 7f867a122af0b05041ff33760cbf9353454c8f3e..22e086178940eff41f7efd435b9dc66ba2c88092 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2007, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *  Copyright (C) 1986-2009, Dave Pare, Jeff Bailey, Thomas Ruschak,
  *                           Ken Stevens, Steve McClure
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -26,9 +26,9 @@
  *  ---
  *
  *  deli.c: Set deliveries from a sector
- * 
+ *
  *  Known contributors to this file:
- *     
+ *
  */
 
 #include <config.h>
@@ -52,16 +52,10 @@ deli(void)
 
     if ((ich = whatitem(player->argp[1], "deliver what? ")) == 0)
        return RET_SYN;
-    /*
-       if (ich->i_uid == I_CIVIL || ich->i_uid == I_MILIT) {
-       pr("You cannot deliver people!\n");
-       return RET_FAIL;
-       }
-     */
     if (!snxtsct(&nstr, player->argp[2]))
        return RET_SYN;
 
-    while (!player->aborted && nxtsct(&nstr, &sect) > 0) {
+    while (nxtsct(&nstr, &sect) > 0) {
        if (!player->owner)
            continue;
 
@@ -75,15 +69,17 @@ deli(void)
        if (!(p = getstarg(player->argp[3], prompt, buf)) || !*p)
            return RET_SYN;
        if (*p != 'q') {
-           sprintf(prompt, "%s %s %s direction? ",
-                   xyas(nstr.x, nstr.y, player->cnum),
-                   dchr[sect.sct_type].d_name, ich->i_name);
            if (((*p >= '0') && (*p <= '9')) || *p == '+') {
                thresh = atoi(p) & ~0x7;
                if (*p == '+')
                    p = NULL;
                else {
+                   sprintf(prompt, "%s %s %s direction? ",
+                           xyas(nstr.x, nstr.y, player->cnum),
+                           dchr[sect.sct_type].d_name, ich->i_name);
                    p = getstarg(player->argp[4], prompt, buf);
+                   if (!p)
+                       return RET_FAIL;
                }
            }
            if (p && *p) {