]> git.pond.sub.org Git - empserver/blobdiff - src/lib/commands/tele.c
Update copyright notice
[empserver] / src / lib / commands / tele.c
index c0dad40ecc59572f7e1aba12a3ddb67bf23b12c8..e3f9a2855eeb9d2cbda9f39102eb3948452c827d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2006, 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
  *
  *  ---
  *
- *  See the "LEGAL", "LICENSE", "CREDITS" and "README" files for all the
- *  related information and legal notices. It is expected that any future
- *  projects/authors will amend these files as needed.
+ *  See files README, COPYING and CREDITS in the root of the source
+ *  tree for related information and legal notices.  It is expected
+ *  that future projects/authors will amend these files as needed.
  *
  *  ---
  *
  *  tele.c: Send a telegram
- * 
+ *
  *  Known contributors to this file:
  *     Steve McClure, 2000
- *    
  */
 
 #include <config.h>
 
-#include "misc.h"
-#include "player.h"
-#include "nat.h"
-#include "tel.h"
-#include "news.h"
-#include "file.h"
 #include "commands.h"
+#include "news.h"
 #include "optlist.h"
+#include "tel.h"
 
 int
 tele(void)
@@ -55,7 +50,7 @@ tele(void)
     if (*player->argp[0] == 'a') {
        if (getele("everybody", buf) <= 0) {
            pr("Announcement aborted\n");
-           return RET_OK;
+           return RET_FAIL;
        }
        pr("\n");
        to = 0;
@@ -64,7 +59,7 @@ tele(void)
     } else if (*player->argp[0] == 'p') {
        if (getele("your Gracious Deity", buf) <= 0) {
            pr("Prayer aborted\n");
-           return RET_OK;
+           return RET_FAIL;
        }
        pr("\n");
        if (typed_wu(player->cnum, 0, buf, TEL_NORM) < 0)
@@ -73,7 +68,7 @@ tele(void)
        int kk;
 
        kk = 1;
-       while (player->argp[kk] != NULL) {
+       do {
            if ((n = natarg(player->argp[kk], "for which country? ")) < 0)
                return RET_SYN;
            to = n;
@@ -82,12 +77,12 @@ tele(void)
                if (player->argp[2]) {
                    if (getele("multiple recipients", buf) < 0) {
                        pr("Telegram aborted\n");
-                       return RET_OK;
+                       return RET_FAIL;
                    }
                } else {
                    if (getele(cname(to), buf) < 0) {
                        pr("Telegram aborted\n");
-                       return RET_OK;
+                       return RET_FAIL;
                    }
                }
                pr("\n");
@@ -95,7 +90,7 @@ tele(void)
 
            natp = getnatp(to);
            if (natp->nat_stat < STAT_SANCT) {
-               pr("%s has no \"telegram priveleges\".\n", cname(to));
+               pr("%s has no \"telegram privileges\".\n", cname(to));
                kk++;
                continue;
            }
@@ -116,7 +111,7 @@ tele(void)
                setcont(to, player->cnum, FOUND_TELE);
            }
            kk++;
-       }
+       } while (player->argp[kk] != NULL);
     }
     return RET_OK;
 }