Login
User Name:

Password:



Register

Forgot your password?
void nanny_get_new_race -- comm.c
Mar 13, 2025 7:08 am
By Elwood
IPv6
Jan 25, 2025 10:45 pm
By Samson
mudstrlcpy and mudstrlcat
Jan 18, 2025 5:23 pm
By Samson
I3 and IMC
Jan 17, 2025 9:35 pm
By Samson
AFKMud 2.5.1
Jan 17, 2025 2:22 pm
By Samson
SWFotEFUSS 1.5.3
Author: Various
Submitted by: Samson
SWRFUSS 1.4.3
Author: Various
Submitted by: Samson
SmaugFUSS 1.9.8
Author: Various
Submitted by: Samson
AFKMud 2.5.2
Author: AFKMud Team
Submitted by: Samson
SmaugFUSS 1.9.7
Author: Various
Submitted by: Samson
Users Online
Anthropic, Remcon, Bytespider, AhrefsBot

Members: 1
Guests: 3
Stats
Files
Topics
Posts
Members
Newest Member
507
3,812
19,722
591
TracySpencer

» SmaugMuds » Bugfix Lists » SmaugFUSS Bugfix List » [Enh] Allow Coded exceptions ...
Forum Rules | Mark all | Recent Posts

[Enh] Allow Coded exceptions to be passed through the bestow command
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Sep 6, 2008 3:43 am   Last edited Sep 6, 2008 3:51 am by Kayle
Go to the top of the page
Go to the bottom of the page

InfiniteAxis
Off the Edge of the Map
GroupAdministrators
Posts1,199
JoinedMar 21, 2006

 
Enhancement: Allow for Exceptions to be passed through bestow for special privileges.
Purpose: Allows coded exceptions to be passed through the bestow function properly so that special privileges like the ability to modify prototype flags below the sysdata level can be given to trusted individuals.
Provided by: Kayle
Applies to: SmaugFUSS

---

act_wiz.c
Function: void do_bestow( CHAR_DATA* ch, const char* argument)
At the top of the function, find:
   bool fComm = FALSE;

Below that, add:
   const char *const bestow_exceptions[] = {
      "protoflag", "caninduct", "canoutcast"
   };


Further down, inside the while loop change it to look like:
   while( arg[0] != '\0' )
   {
      const char *cmd_buf;
      char cmd_tmp[MAX_INPUT_LENGTH];
      short numExceptions = ( sizeof( bestow_exceptions ) / sizeof( bestow_exceptions[0] ) );
      bool cFound = FALSE, isException = FALSE;


      if( get_trust( ch ) < LEVEL_GREATER )
      {
         for( int count = 0; count < numExceptions; count++ )
         {
            if( !str_cmp( arg, bestow_exceptions[count] ) )
            {
               isException = TRUE;
               break;
            }
         }  
      }
      if( !isException && !( cmd = find_command( arg ) ) )
      {
         ch_printf( ch, "No such command as %s!\r\n", arg );
         argument = one_argument( argument, arg );
         continue;
      }
      else if( !isException && cmd->level > get_trust( ch ) )
      {
         ch_printf( ch, "You can't bestow the %s command!\r\n", arg );
         argument = one_argument( argument, arg );
         continue;
      }


clans.c
Function: void do_induct( CHAR_DATA* ch, const char* argument)
Change:
   if( ( ch->pcdata && ch->pcdata->bestowments
         && is_name( "induct", ch->pcdata->bestowments ) )
       || !str_cmp( ch->name, clan->deity )
       || !str_cmp( ch->name, clan->leader ) || !str_cmp( ch->name, clan->number1 ) || !str_cmp( ch->name, clan->number2 ) )
      ;
   else

to
   if( ( ch->pcdata && ch->pcdata->bestowments
         && is_name( "caninduct", ch->pcdata->bestowments ) )
       || !str_cmp( ch->name, clan->deity )
       || !str_cmp( ch->name, clan->leader ) || !str_cmp( ch->name, clan->number1 ) || !str_cmp( ch->name, clan->number2 ) )
      ;
   else


Function: void do_outcast( CHAR_DATA* ch, const char* argument)
Change:
   if( ( ch->pcdata && ch->pcdata->bestowments
         && is_name( "outcast", ch->pcdata->bestowments ) )
       || !str_cmp( ch->name, clan->deity )
       || !str_cmp( ch->name, clan->leader ) || !str_cmp( ch->name, clan->number1 ) || !str_cmp( ch->name, clan->number2 ) )
      ;
   else

to
   if( ( ch->pcdata && ch->pcdata->bestowments
         && is_name( "canoutcast", ch->pcdata->bestowments ) )
       || !str_cmp( ch->name, clan->deity )
       || !str_cmp( ch->name, clan->leader ) || !str_cmp( ch->name, clan->number1 ) || !str_cmp( ch->name, clan->number2 ) )
      ;
   else

Pages:<< prev 1 next >>