diff options
| -rw-r--r-- | src/client.c | 8 | ||||
| -rw-r--r-- | src/server.c | 4 | ||||
| -rw-r--r-- | worlds/test.c | 2 |
3 files changed, 10 insertions, 4 deletions
diff --git a/src/client.c b/src/client.c index 89044b0..3117b63 100644 --- a/src/client.c +++ b/src/client.c @@ -404,6 +404,7 @@ int take_cb(char **save) int wait_cb(char **save) { (void) save; + /* debugging */ send_master(REQ_WAIT, NULL, 0); return CMD_OK; } @@ -425,7 +426,10 @@ int go_cb(char **save) int drop_cb(char **save) { char *what = strtok_r(NULL, "", save); - client_drop(what); + if(what) + client_drop(what); + else + out("You must supply an object.\n"); return CMD_OK; } @@ -444,7 +448,7 @@ static const struct client_cmd { { "LOOK", look_cb, false }, { "INVENTORY", inventory_cb, false }, { "TAKE", take_cb, false }, - { "WAIT", wait_cb, false }, + { "WAIT", wait_cb, true }, { "GO", go_cb, false }, { "DROP", drop_cb, false }, }; diff --git a/src/server.c b/src/server.c index ba7d916..6e8dba2 100644 --- a/src/server.c +++ b/src/server.c @@ -255,9 +255,9 @@ static void new_connection_cb(EV_P_ ev_io *w, int revents) int readpipe[2]; /* child->parent */ int outpipe [2]; /* parent->child */ - if(pipe(readpipe) < 0) + if(socketpair(AF_UNIX, SOCK_SEQPACKET, 0, readpipe) < 0) error("error creating pipe, need linux kernel >= 3.4"); - if(pipe(outpipe) < 0) + if(socketpair(AF_UNIX, SOCK_SEQPACKET, 0, outpipe) < 0) error("error creating pipe, need linux kernel >= 3.4"); pid_t pid = fork(); diff --git a/worlds/test.c b/worlds/test.c index d4d5fb1..7425d81 100644 --- a/worlds/test.c +++ b/worlds/test.c @@ -464,6 +464,8 @@ static void put_exec(struct verb_t *verb, char *args, user_t *user) send_msg(user, "As you put the CPU board in the computer, it immediately springs to life. The lights start flashing, and the fans seem to startup.\n"); bool *b = room_get(user->room)->userdata; *b = true; + + room_get(user->room)->data.desc = strdup("You are in a computer room. It seems like most of the equipment has been removed. There is a VAX 11/780 in front of you, however, with one of the cabinets wide open. A sign on the front of the machine says: This VAX is named 'pokey'. To type on the console, use the 'type' command. The exit is to the east.\nThe panel lights are flashing in a seemingly organized pattern."); } else { |