Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
 Couple bugs
Yesterday, 5:42 pm
By Remcon
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
Bug in will_fall( )
Oct 23, 2017, 1:35 am
By GatewaySysop
Bug in do_zap( ), do_brandish( )
Oct 18, 2017, 1:52 pm
By GatewaySysop
Bug in get_exp_worth( )
Oct 10, 2017, 1:26 am
By GatewaySysop
LOP 1.45
Author: Remcon
Submitted by: Remcon
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Memwatch
Author: Johan Lindh
Submitted by: Vladaar
Users Online
CommonCrawl, Google, DotBot, Yandex

Members: 0
Guests: 12
Stats
Files
Topics
Posts
Members
Newest Member
477
3,705
19,232
608
LAntorcha
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 >>