Login
User Name:

Password:



Register

Forgot your password?
do_owhere recursive
Author: Khonsu
Submitted by: Khonsu
Changes list / Addchange
Author: Khonsu
Submitted by: Khonsu
6Dragons mp3 sound pack
Author: Vladaar
Submitted by: Vladaar
AFKMud 2.2.3
Author: AFKMud Team
Submitted by: Samson
SWFOTEFUSS 1.5
Author: Various
Submitted by: Samson
Users Online
AhrefsBot

Members: 0
Guests: 21
Stats
Files
Topics
Posts
Members
Newest Member
489
3,792
19,646
597
Aileenutz

Today's Birthdays
There are no member birthdays today.
» 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,200
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 >>