From cb8af6e7bf5f6e70fc9722d36448213c719e83c8 Mon Sep 17 00:00:00 2001 From: Franklin Wei Date: Thu, 19 May 2016 16:47:06 -0400 Subject: implement more of dunnet --- src/server_reqs.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/server_reqs.h') 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)); -- cgit v1.1