diff options
| author | Franklin Wei <git@fwei.tk> | 2016-01-26 19:22:53 -0500 |
|---|---|---|
| committer | Franklin Wei <git@fwei.tk> | 2016-01-26 19:27:13 -0500 |
| commit | 3b8df7146fe31518080f3a38eee98222d97ee5b2 (patch) | |
| tree | 7fd7dffd98d0bfd3bdf20e24b184ec5440ca3909 /src/client.c | |
| parent | cbe6bc14de8ad8fd035e0598a3fcc23fb38cfa1a (diff) | |
| download | netcosm-3b8df7146fe31518080f3a38eee98222d97ee5b2.zip netcosm-3b8df7146fe31518080f3a38eee98222d97ee5b2.tar.gz netcosm-3b8df7146fe31518080f3a38eee98222d97ee5b2.tar.bz2 netcosm-3b8df7146fe31518080f3a38eee98222d97ee5b2.tar.xz | |
fix a memory leak, bumps version to 0.4.0-rc1
Diffstat (limited to 'src/client.c')
| -rw-r--r-- | src/client.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/client.c b/src/client.c index 3fab9cb..6812702 100644 --- a/src/client.c +++ b/src/client.c @@ -436,6 +436,11 @@ void client_inventory(void) send_master(REQ_PRINTINVENTORY, NULL, 0); } +void client_drop(char *what) +{ + send_master(REQ_DROP, what, strlen(what) + 1); +} + #define WSPACE " \t\r\n" void client_main(int fd, struct sockaddr_in *addr, int total, int to, int from) @@ -739,6 +744,11 @@ auth: else out("Expected direction after GO.\n"); } + else if(!strcmp(tok, "DROP")) + { + char *what = strtok_r(NULL, " ", &save); + client_drop(what); + } next_cmd: |