]> git.pond.sub.org Git - empserver/blobdiff - src/lib/player/player.c
Clean up superfluous includes
[empserver] / src / lib / player / player.c
index 647cb51516f239ba3289e248276b3533310f48fb..98e642edda82565d1db53d795f43f5dca03fa657 100644 (file)
@@ -34,7 +34,6 @@
 
 #include <config.h>
 
-#include "com.h"
 #include "empio.h"
 #include "empthread.h"
 #include "file.h"
@@ -43,9 +42,7 @@
 #include "nat.h"
 #include "optlist.h"
 #include "player.h"
-#include "proto.h"
 #include "prototypes.h"
-#include "tel.h"
 
 
 static int command(void);
@@ -59,7 +56,6 @@ player_main(struct player *p)
     struct natstr *natp;
     char buf[128];
 
-    p->state = PS_PLAYING;
     player = p;
     time(&player->curup);
     update_timeused_login(player->curup);
@@ -174,7 +170,6 @@ status(void)
     time(&player->curup);
     update_timeused(player->curup);
     if (io_error(player->iop) || io_eof(player->iop)
-       || player->state == PS_SHUTDOWN
        || !may_play_now(natp, player->curup))
        return 0;
 
@@ -256,13 +251,14 @@ execute(void)
            continue;
        }
        pr("\nExecute : ");
-       uprnf(buf);
+       uprnf(player->combuf);
        pr("\n");
        if (redir) {
            pr("Execute : redirection not supported\n");
            failed = 1;
-       } else if (dispatch(buf, NULL) < 0)
+       } else if (dispatch(player->combuf, NULL) < 0)
            failed = 1;
+       /* player->aborted not reset; makes next getcommand() fail */
        empth_yield();
     }
     if (failed) {
@@ -284,7 +280,7 @@ show_motd(void)
 int
 quit(void)
 {
-    player->state = PS_SHUTDOWN;
+    io_set_eof(player->iop);
     return RET_OK;
 }