From: nveid Date: Thu, 26 Oct 2006 00:40:58 +0000 (+0000) Subject: commandrestricthotfix X-Git-Tag: 0.73~227 X-Git-Url: https://git.theari.com/?a=commitdiff_plain;h=0d6d2d043b9dc04e27a16368fe5c632b6df77a26;p=cobramush.git commandrestricthotfix Certain command restrictiosn such as noguest did not give appropriate command failure messages. --- diff --git a/game/txt/changes/0.72p2 b/game/txt/changes/0.72p2 index c79c03e..7f8294d 100644 --- a/game/txt/changes/0.72p2 +++ b/game/txt/changes/0.72p2 @@ -22,3 +22,5 @@ CobraMUSH Version 0.72p2 * In the event two descriptors were connected to a Guest, and one disconnected. Possible through possesing a Guest using @su. Guest was destroyed even though it was connected. [RLB] + * Certain command restrictions that were applied did not give + appropriate command failure messages correctly. [RLB] diff --git a/src/command.c b/src/command.c index ab316da..2284a5a 100644 --- a/src/command.c +++ b/src/command.c @@ -1735,11 +1735,11 @@ command_check(dbref player, COMMAND_INFO *cmd, switch_mask switches) #endif if ((cmd->type & CMD_T_NOGUEST) && Guest(player)) { mess = T("Guests cannot do that."); - return 0; + goto send_error; } if ((cmd->type & CMD_T_GOD) && (!God(player))) { mess = T("Only God can do that."); - return 0; + goto send_error; } switch (Typeof(player)) { case TYPE_ROOM: