]> git.pond.sub.org Git - empserver/blobdiff - src/lib/commands/enli.c
commands: Rename the command functions
[empserver] / src / lib / commands / enli.c
index b60613540391baa589e3d577b047ad13f6fb5324..af710c5c6ce38e7856a2f3a8411bdf7956947a0e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2013, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *  Copyright (C) 1986-2021, Dave Pare, Jeff Bailey, Thomas Ruschak,
  *                Ken Stevens, Steve McClure, Markus Armbruster
  *
  *  Empire is free software: you can redistribute it and/or modify
 
 #include <config.h>
 
+#include "chance.h"
 #include "commands.h"
-#include "treaty.h"
 
 int
-enli(void)
+c_enlist(void)
 {
     struct nstr_sect nstr;
     struct sctstr sect;
@@ -46,7 +46,7 @@ enli(void)
     int newmil;
     int milwant;
     int totalmil;
-    long reserve;
+    int reserve;
     char *p;
     int quota;
     char prompt[128];
@@ -54,8 +54,6 @@ enli(void)
 
     if (!snxtsct(&nstr, player->argp[1]))
        return RET_SYN;
-    if (!trechk(player->cnum, 0, TRTENL))
-       return RET_FAIL;
     natp = getnatp(player->cnum);
     newmil = 500;
     sprintf(prompt, "Number to enlist (max %d) : ", newmil);
@@ -122,7 +120,7 @@ enli(void)
        }
     }
     pr("Total new enlistment : %d\n", totalmil);
-    pr("Military reserves stand at %ld\n", reserve);
+    pr("Military reserves stand at %d\n", reserve);
     if (totalmil) {
        natp->nat_reserve -= totalmil;
        putnat(natp);