Remcon came up with this, but asked me to post it for him because he feels my current rendition of SmaugFUSS is closer to stock than what he's using.
In act_wiz.c, do_sedit, find
if ( get_trust(ch) > LEVEL_GREATER && !str_cmp( arg2, "name" ) )
{
bool relocate;
one_argument( argument, arg1 );
if ( arg1[0] == '\0' )
{
send_to_char( "Cannot clear name field!\n\r", ch );
return;
}
if ( arg1[0] != social->name[0] )
{
unlink_social( social );
relocate = TRUE;
}
else
relocate = FALSE;
if ( social->name )
DISPOSE( social->name );
social->name = str_dup( arg1 );
if ( relocate )
add_social( social );
send_to_char( "Done.\n\r", ch );
return;
}
and replace it with
if( get_trust( ch ) > LEVEL_GREATER && !str_cmp( arg2, "name" ) )
{
bool relocate;
SOCIALTYPE *checksocial;
one_argument( argument, arg1 );
if( arg1[0] == '\0' )
{
send_to_char( "Cannot clear name field!\n\r", ch );
return;
}
if( ( checksocial = find_social( arg1 ) ) != NULL && !str_cmp( checksocial->name, arg1 ) )
{
ch_printf( ch, "There is already a social named %s.\n\r", arg1 );
return;
}
if( arg1[0] != social->name[0] )
{
unlink_social( social );
relocate = TRUE;
}
else
relocate = FALSE;
if( social->name )
DISPOSE( social->name );
social->name = str_dup( arg1 );
if( relocate )
add_social( social );
send_to_char( "Done.\n\r", ch );
return;
}
This should prevent sedit from allowing you to change the name of a social to a name that another social already has without having the code try to duplicate the social before it errors out.