Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
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
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
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, Yahoo!

Members: 0
Guests: 9
Stats
Files
Topics
Posts
Members
Newest Member
477
3,706
19,240
608
LAntorcha
Today's Birthdays
There are no member birthdays today.
Related Links
Files
Upload Rules File Index | Search | Recent Uploads
» Root » SmaugFUSS » Smaug Snippets
Bio Auth
Author Submitted by Version D/L File Size Date Added

Conner Conner 320 24.26 KB Nov 25, 2007

Description
This snippet allows you to require immortal authorization of player biographies before they're displayed to other mortals by the whois command, it optionally also lets you restrict an in-character channel to those who have had their bio approved. Additionally, it lets you restrict bio writing/editing with a nobio command like the stock notell command.

This has been tested on my own mud which is running SmaugFUSS 1.6 under Fedora Core 3 and seems to work just fine with only two known limitations:

1> If someone types 'bio ready' without having edited their bio first (so that their bio gets copied to tempbio and they get the PLR_BIO2 flag) executing an 'abio <player name> accept' command on them will wipe out their existing bio (replace it with a blank string).

2> The abio command will only work on a player who is actually logged in, not loadup'd because they don't have a descriptor that way.

I've tried to make this snippet as easy and complete as I could, even including the help entries for both of the new immortal commands, but this is not a real .c file that should just be tossed into your source directory but rather a code snippet that contains code which can be cut/paste into your code where indicated before recompiling.

Beyond that, what can I say, if you decide to not use this snippet in your code, you are released from all 'license' requirements of this snippet until such time as you change your mind and put it into your code. ;)

Remcon had pointed out the following 'fixes' to this snippet, but I hadn't gotten around to adding them in to the released snippet itself yet.

Remcon said:

In the snippet find:

 set_char_color( AT_IMMORT, victim );

 if ( arg2[0]=='\0' || !str_cmp( arg2, "accept" ) || !str_cmp( arg2, "yes" ) || !str_cmp( arg2, "a" ) || !str_cmp( arg2, "y" ) || !str_cmp( arg2, "approve") )
 {
   xSET_BIT( victim->act, PLR_BIO );
   xREMOVE_BIT( victim->act, PLR_BIO2 );
   if ( victim->pcdata->authbio ) STRFREE( victim->pcdata->authbio );
   victim->pcdata->authbio = QUICKLINK( ch->name );

   if ( victim->pcdata->bio ) STRFREE( victim->pcdata->bio );
   victim->pcdata->bio = QUICKLINK( victim->pcdata->tempbio );

   STRFREE( victim->pcdata->tempbio );
   victim->pcdata->tempbio = STRALLOC("");


You can stop the problem with it wipeing out the current one and putting in an empty string if before the xSET_BIT( victim->act, PLR_BIO ); you check to make sure that tempbio is valid another words by making it something like this.

 set_char_color( AT_IMMORT, victim );

 if ( arg2[0]=='\0' || !str_cmp( arg2, "accept" ) || !str_cmp( arg2, "yes" ) || !str_cmp( arg2, "a" ) || !str_cmp( arg2, "y" ) || !str_cmp( arg2, "approve") )
 {
   if( !victim->pcdata->tempbio || victim->pcdata->tempbio[0] == '\0' )
   {
       ch_printf( ch, "%s's tempbio is empty.\r\n", victim->name);
       return;
   }
   xSET_BIT( victim->act, PLR_BIO );
   xREMOVE_BIT( victim->act, PLR_BIO2 );
   if ( victim->pcdata->authbio ) STRFREE( victim->pcdata->authbio );
   victim->pcdata->authbio = QUICKLINK( ch->name );

   if ( victim->pcdata->bio ) STRFREE( victim->pcdata->bio );
   victim->pcdata->bio = QUICKLINK( victim->pcdata->tempbio );
   STRFREE( victim->pcdata->tempbio );
   victim->pcdata->tempbio = STRALLOC("");


You can also stop allowing them to do bio ready if they dont have a tempbio the same way lol change

 if( !str_cmp( argument, "ready" ) )
 {
   xSET_BIT( ch->act, PLR_BIO2 );
   send_to_char( "The immortals have been made aware that your bio is ready for approval.\n\r", ch );
   sprintf( buf, "%s: has edited/created a bio that is now awaiting authorization.\n\r", ch->name );
   to_channel( buf, CHANNEL_AUTH, "Auth", LEVEL_NEOPHYTE );
   return;
 }


to this

 if( !str_cmp( argument, "ready" ) )
 {
   if( !ch->pcdata || !ch->pcdata->tempbio || ch->pcdata->tempbio[0] == '\0' )
   {
       send_to_char( "You havent edited your bio to need it approved again.\r\n", ch );
       return;
   }
   xSET_BIT( ch->act, PLR_BIO2 );
   send_to_char( "The immortals have been made aware that your bio is ready for approval.\n\r", ch );
   sprintf( buf, "%s: has edited/created a bio that is now awaiting authorization.\n\r", ch->name );
   to_channel( buf, CHANNEL_AUTH, "Auth", LEVEL_NEOPHYTE );
   return;
 }


Rating: | Download | Comments(0)