diff options
| author | Franklin Wei <git@fwei.tk> | 2016-05-19 16:47:06 -0400 |
|---|---|---|
| committer | Franklin Wei <git@fwei.tk> | 2016-05-19 16:47:06 -0400 |
| commit | cb8af6e7bf5f6e70fc9722d36448213c719e83c8 (patch) | |
| tree | ec9f93d6e1256d62a49fb628d8d7a3a931b58330 /src/server_reqs.h | |
| parent | 7f3ba14388a586a946d721a71eb3a9862f7f6c02 (diff) | |
| download | netcosm-cb8af6e7bf5f6e70fc9722d36448213c719e83c8.zip netcosm-cb8af6e7bf5f6e70fc9722d36448213c719e83c8.tar.gz netcosm-cb8af6e7bf5f6e70fc9722d36448213c719e83c8.tar.bz2 netcosm-cb8af6e7bf5f6e70fc9722d36448213c719e83c8.tar.xz | |
implement more of dunnet
Diffstat (limited to 'src/server_reqs.h')
| -rw-r--r-- | src/server_reqs.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/server_reqs.h b/src/server_reqs.h index 10c1755..8db6927 100644 --- a/src/server_reqs.h +++ b/src/server_reqs.h @@ -50,7 +50,7 @@ #define REQ_DROP 22 /* server: drop user object if allowed */ #define REQ_LISTUSERS 23 /* server: list users in USERFILE */ #define REQ_EXECVERB 24 /* server: execute a verb with its arguments */ -#define REQ_RAWMODE 25 /* child: toggle the child's processing of commands and instead sending input directly to master */ +#define REQ_RAWMODE 25 /* child: toggle the child's processing of commands and instead send input directly to master */ /* child states, sent as an int to the master */ #define STATE_INIT 0 /* initial state */ @@ -66,3 +66,9 @@ void reqmap_init(void); void reqmap_free(void); void send_msg(user_t *child, const char *fmt, ...) __attribute__((format(printf,2,3))); + +/* toggle the child into "raw mode": all commands typed by the + * connected client will be send to the world module; + * if the child is already in raw mode the callback is ignored */ + +void child_toggle_rawmode(user_t *child, void (*cb)(user_t*, char *data, size_t len)); |