From 64bf4e18b28591e8b6a6b133b440fa9f28d8e693 Mon Sep 17 00:00:00 2001 From: sabetts Date: Thu, 23 Aug 2001 16:58:28 +0000 Subject: new rudeness command --- src/actions.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'src/actions.c') diff --git a/src/actions.c b/src/actions.c index 9ca22eb..b88ce85 100644 --- a/src/actions.c +++ b/src/actions.c @@ -171,6 +171,7 @@ user_command user_commands[] = {"help", cmd_help, arg_VOID}, {"quit", cmd_quit, arg_VOID}, {"number", cmd_number, arg_STRING}, + {"rudeness", cmd_rudeness, arg_STRING}, /* the following screen commands may or may not be able to be implemented. See the screen documentation for what should be @@ -1169,3 +1170,28 @@ cmd_help (int interactive, void *data) return NULL; } + +char * +cmd_rudeness (int interactive, void *data) +{ + int num; + + if (data == NULL) + { + message ("Rudeness level required"); + return NULL; + } + + if (sscanf ((char *)data, "%d", &num) < 1) + { + message ("Bad rudeness level"); + return NULL; + } + + rp_honour_transient_raise = num & 1; + rp_honour_normal_raise = num & 2; + rp_honour_transient_map = num & 4; + rp_honour_normal_map = num & 8; + + return NULL; +} -- cgit v1.2.3