From 954d5f263905ccf614cd29f371f1aabadb50773b Mon Sep 17 00:00:00 2001 From: gbrunett Date: Fri, 20 Oct 2017 23:30:43 -0400 Subject: [PATCH] added regroup sub-command to do_group to allow players to easily shuffle group order. (#10) --- src/act.other.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/act.other.c b/src/act.other.c index 19b17e0..b4e6390 100644 --- a/src/act.other.c +++ b/src/act.other.c @@ -428,7 +428,20 @@ ACMD(do_group) send_to_char(ch, "You have kicked %s out of the group.\r\n", GET_NAME(vict)); send_to_char(vict, "You have been kicked out of the group.\r\n"); leave_group(vict); + } else if (is_abbrev(buf, "regroup")) { + if (!GROUP(ch)) { + send_to_char(ch, "But you aren't apart of a group!\r\n"); + return; + } + vict = GROUP_LEADER(GROUP(ch)); + if (ch == vict) { + send_to_char(ch, "You are the group leader and cannot re-group.\r\n"); + } else { + leave_group(ch); + join_group(ch, GROUP(vict)); + } } else if (is_abbrev(buf, "leave")) { + if (!GROUP(ch)) { send_to_char(ch, "But you aren't apart of a group!\r\n"); return;