]> git.pond.sub.org Git - empserver/blobdiff - src/lib/commands/disa.c
Store update disable flag in the game table to make it visible in
[empserver] / src / lib / commands / disa.c
index ca2534d5786d620116296167bc107941c75463a7..663160002c1bf42486e357efd64aeca24633c6d0 100644 (file)
 
 #include <config.h>
 
-#if defined(_WIN32)
-#include <io.h>
-#endif
-#include <fcntl.h>
-#include <sys/stat.h>
-#if !defined(_WIN32)
-#include <unistd.h>
-#endif
 #include "commands.h"
-#include "optlist.h"
+#include "game.h"
 
 int
 disa(void)
 {
-    int fd;
-
-    if ((fd = open(disablefil, O_RDWR | O_CREAT | O_TRUNC, S_IRWUG)) < 0)
-       return RET_FAIL;
-    close(fd);
+    game_ctrl_update(0);
     pr("Updates are disabled\n");
     return RET_OK;
 }