diff options
Diffstat (limited to 'src/actions.c')
-rw-r--r-- | src/actions.c | 26 |
1 files changed, 26 insertions, 0 deletions
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; +} |