Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
tintin++ ogg sound player script for linux
Author: Robert Smith
Submitted by: Vladaar
6Dragons ogg Soundpack
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.4
Author: Vladaar
Submitted by: Vladaar
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
Users Online
CommonCrawl, Google, Yandex

Members: 0
Guests: 17
Stats
Files
Topics
Posts
Members
Newest Member
481
3,739
19,386
621
KellieBusb
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Bugfix Lists » SmaugFUSS Bugfix List » [Bug] Clan and council leader...
Forum Rules | Mark all | Recent Posts

[Bug] Clan and council leadership being outcast does not clear their names
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Jul 30, 2005, 6:38 am
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,643
JoinedJan 1, 2002

Bug: Clan and council leadership being outcast does not clear their names from the leader list.
Danger: Low - Data maintenance
Found by: Gatewaysysop
Fixed by: Gatewaysysop

---

build.c, do_mset

Locate:
         /*
          * Added a check on immortals so immortals don't take up
          * * any membership space. --Shaddai
          */
	   if( !IS_IMMORTAL( victim ) ) 
         {
            --victim->pcdata->clan->members;
            if( victim->pcdata->clan->members < 0 )
               victim->pcdata->clan->members = 0;
            save_clan( victim->pcdata->clan );
         }


Replace with:

         /* Added a check on immortals so immortals don't take up
          * any membership space. --Shaddai
          */
         if( !IS_IMMORTAL( victim ) )
         {
            --victim->pcdata->clan->members; 
            if( victim->pcdata->clan->members < 0 )
               victim->pcdata->clan->members = 0;

            if( !str_cmp( victim->name, victim->pcdata->clan->leader ) )
            {
               STRFREE( victim->pcdata->clan->leader );
               victim->pcdata->clan->leader = STRALLOC( "" );
            }
            if( !str_cmp( victim->name, victim->pcdata->clan->number1 ) )
            {
               STRFREE( victim->pcdata->clan->number1 );
               victim->pcdata->clan->number1 = STRALLOC( "" );
            }
            if( !str_cmp( victim->name, victim->pcdata->clan->number2 ) )
            {
               STRFREE( victim->pcdata->clan->number2 );
               victim->pcdata->clan->number2 = STRALLOC( "" );
            } 
            if( !str_cmp( victim->name, victim->pcdata->clan->deity ) )
            {
               STRFREE( victim->pcdata->clan->deity );
               victim->pcdata->clan->deity = STRALLOC( "" );
            }
            save_clan( victim->pcdata->clan );
         }


Then further below, locate:
      if( victim->pcdata->clan != NULL && !IS_IMMORTAL( victim ) )
      {
         --victim->pcdata->clan->members;
         if( victim->pcdata->clan->members < 0 )
            victim->pcdata->clan->members = 0;
         save_clan( victim->pcdata->clan );
      }


Replace with:
      if( victim->pcdata->clan != NULL && !IS_IMMORTAL( victim ) )
      {
         --victim->pcdata->clan->members; 
         if( victim->pcdata->clan->members < 0 )
            victim->pcdata->clan->members = 0;

         if( !str_cmp( victim->name, victim->pcdata->clan->leader ) )
         {
            STRFREE( victim->pcdata->clan->leader );
            victim->pcdata->clan->leader = STRALLOC( "" );
         }
         if( !str_cmp( victim->name, victim->pcdata->clan->number1 ) )
         {
            STRFREE( victim->pcdata->clan->number1 );
            victim->pcdata->clan->number1 = STRALLOC( "" );
         }
         if( !str_cmp( victim->name, victim->pcdata->clan->number2 ) )
         {
            STRFREE( victim->pcdata->clan->number2 );
            victim->pcdata->clan->number2 = STRALLOC( "" );
         } 
         if( !str_cmp( victim->name, victim->pcdata->clan->deity ) )
         {
            STRFREE( victim->pcdata->clan->deity );
            victim->pcdata->clan->deity = STRALLOC( "" );
         }
         save_clan( victim->pcdata->clan );
      }


Further below that, locate:
      if( !arg3 || arg3[0] == '\0' )
      {
         if( victim->pcdata->council )
         {
            --victim->pcdata->council->members;
            if( victim->pcdata->council->members < 0 )
               victim->pcdata->council->members = 0;
            save_council( victim->pcdata->council );
         }
         STRFREE( victim->pcdata->council_name );
         victim->pcdata->council_name = STRALLOC( "" );
         victim->pcdata->council = NULL;
         send_to_char( "Removed from council.\n\r", ch );
         return;
      }


Replace with:
      if( !arg3 || arg3[0] == '\0' )
      {
         if( victim->pcdata->council )
         {
            --victim->pcdata->council->members;
            if( victim->pcdata->council->members < 0 )
               victim->pcdata->council->members = 0;

            if( !str_cmp( victim->name, victim->pcdata->council->head ) )
            {
               STRFREE( victim->pcdata->council->head );
               victim->pcdata->council->head = STRALLOC( "" );
            }
            if( victim->pcdata->council->head2 != NULL 
              && !str_cmp( victim->name, victim->pcdata->council->head2 ) )
            {
               STRFREE( victim->pcdata->council->head2 );
               victim->pcdata->council->head2 = NULL;
            }
            save_council( victim->pcdata->council );
         }
         STRFREE( victim->pcdata->council_name );
         victim->pcdata->council_name = STRALLOC( "" );
         victim->pcdata->council = NULL;
         send_to_char( "Removed from council.\n\r", ch );
         return;
      }


Then locate:
      if( victim->pcdata->council )
      {
         --victim->pcdata->council->members;
         if( victim->pcdata->council->members < 0 )
            victim->pcdata->council->members = 0;
         save_council( victim->pcdata->council );
      }


Replace with:
      if( victim->pcdata->council )
      {
         --victim->pcdata->council->members;
         if( victim->pcdata->council->members < 0 )
            victim->pcdata->council->members = 0;

         if( !str_cmp( victim->name, victim->pcdata->council->head ) )
         {
            STRFREE( victim->pcdata->council->head );
            victim->pcdata->council->head = STRALLOC( "" );
         }
         if( victim->pcdata->council->head2 != NULL 
           && !str_cmp( victim->name, victim->pcdata->council->head2 ) )
         {
            STRFREE( victim->pcdata->council->head2 );
            victim->pcdata->council->head2 = NULL;
         }
         save_council( victim->pcdata->council );
      }


All this does is make sure the leadership spots on clans and councils are properly maintained when a leader of one is either outcast, or changed to a new one. This keeps the records accurate.
       
Pages:<< prev 1 next >>