Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
auth_update crash
Dec 23, 2017, 10:15 pm
By Remcon
check_tumble
Dec 18, 2017, 7:21 pm
By Remcon
parse description bug
Dec 15, 2017, 10:08 pm
By Remcon
Couple bugs
Dec 12, 2017, 5:42 pm
By Remcon
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
6Dragons 4.4
Author: Vladaar
Submitted by: Vladaar
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
Users Online
CommonCrawl, Yandex, Google, Bing, Yahoo!

Members: 0
Guests: 17
Stats
Files
Topics
Posts
Members
Newest Member
479
3,708
19,242
614
BenitoVirg
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » 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, 1:43 am   Last edited Sep 6, 2008, 1:51 am by Kayle
Go to the top of the page
Go to the bottom of the page

Kayle
Off the Edge of the Map
GroupAdministrators
Posts1,195
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 >>