Skip to content

Commit

Permalink
Merge pull request #719 from wyld-sw/master
Browse files Browse the repository at this point in the history
More cleanup and flag setting refactor - part 1.
  • Loading branch information
tanabi authored Jan 28, 2024
2 parents 402d60d + 77116ac commit 7821f5c
Show file tree
Hide file tree
Showing 6 changed files with 1,117 additions and 1,188 deletions.
23 changes: 23 additions & 0 deletions include/db.h
Original file line number Diff line number Diff line change
Expand Up @@ -2324,6 +2324,29 @@ void register_object(dbref player, dbref location, const char *propdir, char *na
*/
dbref remove_first(dbref first, dbref what);

/**
* Determines if a given player is unable to (re)set the given flag
*
* The 'business logic' here is actually fairly dense and not easily
* summed up in a comment. The reader is encouraged to review the very
* well documented code for details.
*
* This is all pretty well documented in the MUCK's help files.
*
* Uses an error parameter to communicate the reason for failure. This
* should be at least SMALL_BUFFER_LEN in size.
*
* @private
* @param player the effective aplayer we are checking permissions for
* @param mlev the effective mucker level we are checking permissions for
* @param thing the thing we want to interact with
* @param flag the flag we wish to interact with
* @param value whether the desired state is on or off
* @param error[out] error message, if any
* @return boolean 1 if restricted from setting flag, 0 if okay to set.
*/
int unable_to_set_flag(dbref player, int mlev, dbref thing, object_flag_type flag, bool value, char *error);

/**
* This reverses a dbref linked list
*
Expand Down
2 changes: 1 addition & 1 deletion src/db.c
Original file line number Diff line number Diff line change
Expand Up @@ -2390,7 +2390,7 @@ str_to_flag(const char *flag_string)
} else if (string_prefix("nucker", flag_string)) {
return SMUCKER;
} else if (string_prefix("overt", flag_string)) {
return (int)OVERT;
return OVERT;
} else if (string_prefix("quell", flag_string)) {
return QUELL;
} else if (string_prefix("sticky", flag_string)
Expand Down
2 changes: 1 addition & 1 deletion src/fbtime.c
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ timestr_long(long dtime)
*
* @param string the string to convert
* @param format the string's format
* @parm[out] error the error message, if any
* @param[out] error the error message, if any
* @return the time in seconds
*/
#ifndef WIN32
Expand Down
Loading

0 comments on commit 7821f5c

Please sign in to comment.