quit.c

melville/cmds/player/quit.c · 328 B

From the archive melville_0.9.tar.gz

Download the archive   « Back to the archive contents

/*
   quit.c
   Lets a player quit the game.
   We don't want this called except from a player object.
*/

#include <config.h>

int do_command (string str) {
    if (str) return 0 ;
    if (base_name(previous_object()) != PLAYER) return 0 ;
    write ("See you again soon!\n") ;
    previous_object()->quit() ;
    return 1 ;
}

Site Stats

Snippets: 1791
Codebases: 571