Crossfire Server, Branches 1.12  R18729
plugins.c File Reference
#include <plugin.h>
#include <sproto.h>
#include <timers.h>
+ Include dependency graph for plugins.c:

Go to the source code of this file.

Macros

#define NR_OF_HOOKS   89
 
#define string_get_int(name)
 

Functions

void * cfapi_archetype_get_property (int *type,...)
 
void * cfapi_friendlylist_get_next (int *type,...)
 
void * cfapi_generate_random_map (int *type,...)
 
void * cfapi_get_hooks (int *type,...)
 
void * cfapi_get_month_name (int *type,...)
 
void * cfapi_get_periodofday_name (int *type,...)
 
void * cfapi_get_season_name (int *type,...)
 
void * cfapi_get_time (int *type,...)
 
void * cfapi_get_weekday_name (int *type,...)
 
void * cfapi_log (int *type,...)
 
void * cfapi_map_change_light (int *type,...)
 
void * cfapi_map_create_path (int *type,...)
 
void * cfapi_map_delete_map (int *type,...)
 
void * cfapi_map_get_map (int *type,...)
 
void * cfapi_map_get_map_property (int *type,...)
 
void * cfapi_map_get_object_at (int *type,...)
 
void * cfapi_map_has_been_loaded (int *type,...)
 
void * cfapi_map_message (int *type,...)
 
void * cfapi_map_out_of_map (int *type,...)
 
void * cfapi_map_present_arch_by_name (int *type,...)
 
void * cfapi_map_set_map_property (int *type,...)
 
void * cfapi_map_trigger_connected (int *type,...)
 
void * cfapi_map_update_position (int *type,...)
 
void * cfapi_object_apply (int *type,...)
 
void * cfapi_object_apply_below (int *type,...)
 
void * cfapi_object_cast (int *type,...)
 
void * cfapi_object_change_abil (int *type,...)
 
void * cfapi_object_change_exp (int *type,...)
 
void * cfapi_object_check_inventory (int *type,...)
 
void * cfapi_object_check_spell (int *type,...)
 
void * cfapi_object_check_trigger (int *type,...)
 
void * cfapi_object_clean_object (int *type,...)
 
void * cfapi_object_clear (int *type,...)
 
void * cfapi_object_clone (int *type,...)
 
void * cfapi_object_create (int *type,...)
 
void * cfapi_object_delete (int *type,...)
 
void * cfapi_object_describe (int *type,...)
 
void * cfapi_object_distance (int *type,...)
 
void * cfapi_object_drain (int *type,...)
 
void * cfapi_object_drop (int *type,...)
 
void * cfapi_object_find (int *type,...)
 
void * cfapi_object_find_archetype_inside (int *type,...)
 
void * cfapi_object_fix (int *type,...)
 
void * cfapi_object_forget_spell (int *type,...)
 
void * cfapi_object_get_key (int *type,...)
 
void * cfapi_object_get_property (int *type,...)
 
void * cfapi_object_give_skill (int *type,...)
 
void * cfapi_object_identify (int *type,...)
 
void * cfapi_object_insert (int *type,...)
 
void * cfapi_object_learn_spell (int *type,...)
 
void * cfapi_object_merge (int *type,...)
 
void * cfapi_object_move (int *type,...)
 
void * cfapi_object_on_same_map (int *type,...)
 
void * cfapi_object_pay_amount (int *type,...)
 
void * cfapi_object_pay_item (int *type,...)
 
void * cfapi_object_pickup (int *type,...)
 
void * cfapi_object_query_cost (int *type,...)
 
void * cfapi_object_query_money (int *type,...)
 
void * cfapi_object_remove (int *type,...)
 
void * cfapi_object_reset (int *type,...)
 
void * cfapi_object_say (int *type,...)
 
void * cfapi_object_set_key (int *type,...)
 
void * cfapi_object_set_property (int *type,...)
 
void * cfapi_object_split (int *type,...)
 
void * cfapi_object_spring_trap (int *type,...)
 
void * cfapi_object_teleport (int *type,...)
 
void * cfapi_object_transfer (int *type,...)
 
void * cfapi_object_transmute (int *type,...)
 
void * cfapi_object_update (int *type,...)
 
void * cfapi_object_user_event (int *type,...)
 
void * cfapi_party_get_property (int *type,...)
 
void * cfapi_player_can_pay (int *type,...)
 
void * cfapi_player_find (int *type,...)
 
void * cfapi_player_message (int *type,...)
 
void * cfapi_region_get_property (int *type,...)
 
void * cfapi_set_random_map_variable (int *type,...)
 
void * cfapi_system_add_string (int *type,...)
 
void * cfapi_system_check_path (int *type,...)
 
void * cfapi_system_directory (int *type,...)
 
void * cfapi_system_find_animation (int *type,...)
 
void * cfapi_system_find_face (int *type,...)
 
void * cfapi_system_find_string (int *type,...)
 
void * cfapi_system_re_cmp (int *type,...)
 
void * cfapi_system_register_global_event (int *type,...)
 
void * cfapi_system_remove_string (int *type,...)
 
void * cfapi_system_strdup_local (int *type,...)
 
void * cfapi_system_unregister_global_event (int *type,...)
 
void * cfapi_timer_create (int *type,...)
 
void * cfapi_timer_destroy (int *type,...)
 
void cleanupPlugins (void)
 
static void copy_message (object *op, const char *msg)
 
int execute_event (object *op, int eventcode, object *activator, object *third, const char *message, int fix)
 
int execute_global_event (int eventcode,...)
 
command_array_structfind_plugin_command (char *cmd, object *op)
 
int initPlugins (void)
 
void plugins_display_list (object *op)
 
crossfire_pluginplugins_find_plugin (const char *id)
 
int plugins_init_plugin (const char *libfile)
 
int plugins_remove_plugin (const char *id)
 
static void send_changed_object (object *op)
 
int user_event (object *op, object *activator, object *third, const char *message, int fix)
 

Variables

static const hook_entry plug_hooks [NR_OF_HOOKS]
 
int plugin_number = 0
 
crossfire_pluginplugins_list = NULL
 

Detailed Description

Plugin API.

Todo:
describe "wrappers" for functions, conventions used (parameters + return value).

Definition in file plugins.c.

Macro Definition Documentation

#define NR_OF_HOOKS   89

Definition at line 61 of file plugins.c.

Referenced by cfapi_get_hooks().

#define string_get_int (   name)
Value:
va_list args; \
int index; \
const char **str; \
va_start(args, type); \
index = va_arg(args, int); \
str = va_arg(args, const char **); \
va_end(args); \
*str = name(index); \
*type = CFAPI_STRING; \
return NULL; \
#define CFAPI_STRING
Definition: plugin.h:104

Definition at line 937 of file plugins.c.

Referenced by cfapi_get_month_name(), cfapi_get_periodofday_name(), cfapi_get_season_name(), and cfapi_get_weekday_name().

Function Documentation

void* cfapi_friendlylist_get_next ( int *  type,
  ... 
)

Friend list access, to get objects on it.

Expects one parameter, ob.

Parameters
typeunused
Returns
  • if ob is NULL, gets the first object on the friendlylist.
  • if not NULL, get next object on the friendlylist after ob. NULL if none or ob not on list.

Definition at line 4439 of file plugins.c.

References CFAPI_POBJECT, first_friendly_object, oblnk::next, and oblnk::ob.

void* cfapi_generate_random_map ( int *  type,
  ... 
)

Wrapper for generate_random_map().

Parameters
typeunused.
Returns
NULL.

Definition at line 4511 of file plugins.c.

References generate_random_map().

+ Here is the call graph for this function:

void* cfapi_get_hooks ( int *  type,
  ... 
)

Definition at line 527 of file plugins.c.

References CFAPI_FUNC, CFAPI_NONE, _hook_entry::func, and NR_OF_HOOKS.

Referenced by plugins_init_plugin().

+ Here is the caller graph for this function:

void* cfapi_get_month_name ( int *  type,
  ... 
)

Wrapper for get_season_name().

Parameters
typewill be CFAPI_STRING. Other parameters are int index and char** where to store result string
Returns
NULL.

Definition at line 981 of file plugins.c.

References get_month_name(), and string_get_int.

+ Here is the call graph for this function:

void* cfapi_get_periodofday_name ( int *  type,
  ... 
)

Wrapper for get_season_name().

Parameters
typewill be CFAPI_STRING. Other parameters are int index and char** where to store result string
Returns
NULL.

Definition at line 993 of file plugins.c.

References get_periodofday(), and string_get_int.

+ Here is the call graph for this function:

void* cfapi_get_season_name ( int *  type,
  ... 
)

Wrapper for get_season_name().

Parameters
typewill be CFAPI_STRING. Other parameters are int index and char** where to store result string
Returns
NULL.

Definition at line 957 of file plugins.c.

References get_season_name(), and string_get_int.

+ Here is the call graph for this function:

void* cfapi_get_time ( int *  type,
  ... 
)

Wrapper for get_tod().

Parameters
typewill be CFAPI_NONE.
Returns
NULL.

Definition at line 924 of file plugins.c.

References CFAPI_NONE, and get_tod().

+ Here is the call graph for this function:

void* cfapi_get_weekday_name ( int *  type,
  ... 
)

Wrapper for get_season_name().

Parameters
typewill be CFAPI_STRING. Other parameters are int index and char** where to store result string
Returns
NULL.

Definition at line 969 of file plugins.c.

References get_weekday(), and string_get_int.

+ Here is the call graph for this function:

void* cfapi_log ( int *  type,
  ... 
)

Wrapper for LOG().

Parameters
typewill be CFAPI_NONE.
Returns
NULL.

Definition at line 1069 of file plugins.c.

References CFAPI_NONE, and LOG().

+ Here is the call graph for this function:

void* cfapi_map_change_light ( int *  type,
  ... 
)

Wrapper for change_map_light().

Parameters
typewill be CFAPI_INT.
Returns
NULL.

Definition at line 1512 of file plugins.c.

References CFAPI_INT, and change_map_light().

+ Here is the call graph for this function:

void* cfapi_map_create_path ( int *  type,
  ... 
)

Wrapper for create_pathname() and create_overlay_pathname().

Parameters
typewill be CFAPI_STRING.
Returns
NULL.

Definition at line 1170 of file plugins.c.

References CFAPI_NONE, CFAPI_STRING, create_overlay_pathname(), create_pathname(), and MAX_BUF.

+ Here is the call graph for this function:

void* cfapi_map_delete_map ( int *  type,
  ... 
)

Definition at line 1413 of file plugins.c.

References CFAPI_NONE, and delete_map().

+ Here is the call graph for this function:

void* cfapi_map_get_map ( int *  type,
  ... 
)

Gets map information.

First parameter is a integer, which should be:

  • 0 with 2 int and a mapstruct**: new map of specified size.
  • 1 with char*, int, mapstruct**: call ready_map_name().
  • 2 with mapstruct*, 2 int and mapstruct**: call to get_map_from_coord().

Definition at line 1095 of file plugins.c.

References CFAPI_NONE, CFAPI_PMAP, get_empty_map(), get_map_from_coord(), and ready_map_name().

+ Here is the call graph for this function:

void* cfapi_map_get_object_at ( int *  type,
  ... 
)

Wrapper for GET_MAP_OB().

Parameters
typewill be CFAPI_POBJECT.
Returns
NULL.

Definition at line 1451 of file plugins.c.

References CFAPI_POBJECT, get_map_flags(), GET_MAP_OB, and P_OUT_OF_MAP.

+ Here is the call graph for this function:

void* cfapi_map_has_been_loaded ( int *  type,
  ... 
)

Wrapper for has_been_loaded().

Parameters
typewill be CFAPI_PMAP.
Returns
NULL.

Definition at line 1149 of file plugins.c.

References CFAPI_PMAP, and has_been_loaded().

+ Here is the call graph for this function:

void* cfapi_map_message ( int *  type,
  ... 
)

Definition at line 1426 of file plugins.c.

References CFAPI_NONE, ext_info_map(), MSG_SUBTYPE_NONE, and MSG_TYPE_MISC.

+ Here is the call graph for this function:

void* cfapi_map_out_of_map ( int *  type,
  ... 
)

Wrapper for out_of_map().

Parameters
typewill be CFAPI_INT.
Returns
NULL.

Definition at line 1371 of file plugins.c.

References CFAPI_INT, and out_of_map().

+ Here is the call graph for this function:

void* cfapi_map_present_arch_by_name ( int *  type,
  ... 
)

Kinda wrapper for present_arch() (but uses a string, not an archetype*).

Parameters
typewill be CFAPI_POBJECT.
Returns
NULL.
Todo:
fix archetype instead of string.

Definition at line 1483 of file plugins.c.

References CFAPI_POBJECT, present_arch(), and try_find_archetype().

+ Here is the call graph for this function:

void* cfapi_map_set_map_property ( int *  type,
  ... 
)

Definition at line 1338 of file plugins.c.

References CFAPI_MAP_PROP_PATH, CFAPI_NONE, CFAPI_STRING, mapdef::path, and snprintf().

+ Here is the call graph for this function:

void* cfapi_map_trigger_connected ( int *  type,
  ... 
)

Wrapper for trigger_connected().

Expected parameters after type:

  • objectlink*: the link to trigger. Can be obtained from map structure
  • object*: the object that cause this link to trigger, may be NULL
  • int: the state to trigger. 0=APPLY_RELEASE other=APPLY_PUSH
Parameters
[out]typeWill be CFAPI_NONE.
Returns
NULL.

Definition at line 3729 of file plugins.c.

References CFAPI_NONE, and trigger_connected().

+ Here is the call graph for this function:

void* cfapi_map_update_position ( int *  type,
  ... 
)

Wrapper for update_position().

Parameters
typeCFAPI_NONE.
Returns
NULL.

Definition at line 1396 of file plugins.c.

References CFAPI_NONE, and update_position().

+ Here is the call graph for this function:

void* cfapi_object_apply ( int *  type,
  ... 
)

Applies an object.

Parameters
typewill be CFAPI_INT.
Returns
always NULL.

Definition at line 3084 of file plugins.c.

References CFAPI_INT, and manual_apply().

+ Here is the call graph for this function:

void* cfapi_object_apply_below ( int *  type,
  ... 
)

Applies an object below.

Parameters
typewill be CFAPI_NONE.
Returns
always NULL.

Definition at line 3061 of file plugins.c.

References CFAPI_NONE, and player_apply_below().

+ Here is the call graph for this function:

void* cfapi_object_cast ( int *  type,
  ... 
)

Wrapper for query_money().

Parameters
typeWill be CFAPI_INT.
Returns
NULL.

Definition at line 3800 of file plugins.c.

References cast_spell(), CFAPI_INT, and obj::map.

+ Here is the call graph for this function:

void* cfapi_object_change_abil ( int *  type,
  ... 
)

Wrapper for change_abil().

Definition at line 4070 of file plugins.c.

References CFAPI_INT, and change_abil().

+ Here is the call graph for this function:

void* cfapi_object_change_exp ( int *  type,
  ... 
)

Wrapper for change_exp().

Parameters
typewill be CFAPI_NONE.
Returns
NULL.

Definition at line 4162 of file plugins.c.

References CFAPI_NONE, and change_exp().

+ Here is the call graph for this function:

void* cfapi_object_check_inventory ( int *  type,
  ... 
)

Definition at line 3621 of file plugins.c.

References CFAPI_NONE, CFAPI_POBJECT, check_inv(), and check_inv_recursive().

+ Here is the call graph for this function:

void* cfapi_object_check_spell ( int *  type,
  ... 
)

Wrapper for check_spell_known().

Parameters
typeWill be CFAPI_POBJECT.
Returns
NULL.

Definition at line 3868 of file plugins.c.

References CFAPI_POBJECT, and check_spell_known().

+ Here is the call graph for this function:

void* cfapi_object_check_trigger ( int *  type,
  ... 
)

Wrapper for check_trigger().

Parameters
typeWill be CFAPI_INT.
Returns
NULL.

Definition at line 3699 of file plugins.c.

References CFAPI_INT, and check_trigger().

+ Here is the call graph for this function:

void* cfapi_object_clean_object ( int *  type,
  ... 
)

Definition at line 3647 of file plugins.c.

References CFAPI_NONE, and clean_object().

+ Here is the call graph for this function:

void* cfapi_object_clear ( int *  type,
  ... 
)

Wrapper for clear_object().

Parameters
typeWill be CFAPI_NONE.
Returns
NULL.

Definition at line 3585 of file plugins.c.

References CFAPI_NONE, and clear_object().

+ Here is the call graph for this function:

void* cfapi_object_clone ( int *  type,
  ... 
)

Clone an object, either through object_create_clone() or copy_object().

Parameters
typewill be CFAPI_POBJECT.
Returns
NULL.

Definition at line 3274 of file plugins.c.

References CFAPI_POBJECT, copy_object(), get_object(), and object_create_clone().

+ Here is the call graph for this function:

void* cfapi_object_create ( int *  type,
  ... 
)

Wrapper for get_object(), create_archetype() and create_archetype_by_object_name().

Parameters
typewill be CFAPI_POBJECT, or CFAPI_NONE if invalid value asked for.
Returns
NULL.

Definition at line 3355 of file plugins.c.

References CFAPI_NONE, CFAPI_POBJECT, find_archetype_by_object_name(), get_object(), object_create_arch(), and try_find_archetype().

+ Here is the call graph for this function:

void* cfapi_object_delete ( int *  type,
  ... 
)

Definition at line 3245 of file plugins.c.

References CFAPI_NONE, FLAG_FREED, FLAG_REMOVED, free_object(), llevError, LOG(), obj::name, and QUERY_FLAG.

+ Here is the call graph for this function:

void* cfapi_object_describe ( int *  type,
  ... 
)

Wrapper for describe_item().

Parameters
typewill be CFAPI_STRING.
Returns
NULL.

Definition at line 3134 of file plugins.c.

References CFAPI_STRING, and describe_item().

+ Here is the call graph for this function:

void* cfapi_object_distance ( int *  type,
  ... 
)

Wrapper for distance().

Parameters
typewill be CFAPI_INT.
Returns
NULL.

Definition at line 3538 of file plugins.c.

References CFAPI_INT, and distance().

+ Here is the call graph for this function:

void* cfapi_object_drain ( int *  type,
  ... 
)

Definition at line 3154 of file plugins.c.

References CFAPI_NONE, and drain_specific_stat().

+ Here is the call graph for this function:

void* cfapi_object_drop ( int *  type,
  ... 
)

Wrapper for drop().

Parameters
typewill be CFAPI_NONE.
Returns
NULL.

Definition at line 4044 of file plugins.c.

References CFAPI_NONE, obj::contr, pl::count, drop(), FLAG_NO_DROP, PLAYER, QUERY_FLAG, pl::socket, obj::type, and socket_struct::update_look.

+ Here is the call graph for this function:

void* cfapi_object_find ( int *  type,
  ... 
)

Definition at line 3301 of file plugins.c.

References CFAPI_NONE, CFAPI_POBJECT, find_obj_by_type_subtype(), find_object(), find_object_name(), and get_player_container().

+ Here is the call graph for this function:

void* cfapi_object_find_archetype_inside ( int *  type,
  ... 
)

Kinda wrapper for present_arch_in_ob().

Definition at line 4004 of file plugins.c.

References obj::below, CFAPI_POBJECT, obj::inv, MAX_BUF, obj::name, present_arch_in_ob(), query_name(), and try_find_archetype().

+ Here is the call graph for this function:

void* cfapi_object_fix ( int *  type,
  ... 
)

Definition at line 3173 of file plugins.c.

References CFAPI_NONE, and fix_object().

+ Here is the call graph for this function:

void* cfapi_object_forget_spell ( int *  type,
  ... 
)

Definition at line 3845 of file plugins.c.

References CFAPI_NONE, do_forget_spell(), MAX_BUF, and query_name().

+ Here is the call graph for this function:

void* cfapi_object_get_key ( int *  type,
  ... 
)

Gets a key/value value for an object.

Parameters
typewill contain CFAPI_SSTRING.
Returns
NULL.
See Also
get_ob_key_value().

Definition at line 1588 of file plugins.c.

References CFAPI_SSTRING, and get_ob_key_value().

+ Here is the call graph for this function:

void* cfapi_object_get_property ( int *  type,
  ... 
)

Main object property getter.

Definition at line 1637 of file plugins.c.

References obj::above, liv::ac, obj::active_next, obj::active_prev, obj::anim_speed, obj::animation_id, obj::arch, obj::attack_movement, obj::attacked_by, obj::attacktype, pl::bed_x, pl::bed_y, obj::below, can_merge(), can_pick(), obj::carrying, CFAPI_DOUBLE, CFAPI_FLOAT, CFAPI_INT, CFAPI_INT16, CFAPI_LONG, CFAPI_MOVETYPE, CFAPI_NONE, CFAPI_OBJECT_PROP_AC, CFAPI_OBJECT_PROP_ANIM_SPEED, CFAPI_OBJECT_PROP_ANIMATION, CFAPI_OBJECT_PROP_ARCH_NAME, CFAPI_OBJECT_PROP_ARCHETYPE, CFAPI_OBJECT_PROP_ATTACK_MOVEMENT, CFAPI_OBJECT_PROP_ATTACK_TYPE, CFAPI_OBJECT_PROP_ATTACKED_BY, CFAPI_OBJECT_PROP_BASE_NAME, CFAPI_OBJECT_PROP_CARRYING, CFAPI_OBJECT_PROP_CHA, CFAPI_OBJECT_PROP_CHEATER, CFAPI_OBJECT_PROP_CHOSEN_SKILL, CFAPI_OBJECT_PROP_CLIENT_TYPE, CFAPI_OBJECT_PROP_CON, CFAPI_OBJECT_PROP_CONTAINER, CFAPI_OBJECT_PROP_COUNT, CFAPI_OBJECT_PROP_CURRENT_WEAPON, CFAPI_OBJECT_PROP_CUSTOM_NAME, CFAPI_OBJECT_PROP_DAM, CFAPI_OBJECT_PROP_DEX, CFAPI_OBJECT_PROP_DIRECTION, CFAPI_OBJECT_PROP_DURATION, CFAPI_OBJECT_PROP_ENEMY, CFAPI_OBJECT_PROP_ENVIRONMENT, CFAPI_OBJECT_PROP_EXP, CFAPI_OBJECT_PROP_EXP_MULTIPLIER, CFAPI_OBJECT_PROP_FACE, CFAPI_OBJECT_PROP_FACING, CFAPI_OBJECT_PROP_FLAGS, CFAPI_OBJECT_PROP_FP, CFAPI_OBJECT_PROP_FRIENDLY, CFAPI_OBJECT_PROP_GEN_SP_ARMOUR, CFAPI_OBJECT_PROP_GLOW_RADIUS, CFAPI_OBJECT_PROP_GOD, CFAPI_OBJECT_PROP_GP, CFAPI_OBJECT_PROP_HEAD, CFAPI_OBJECT_PROP_HIDDEN, CFAPI_OBJECT_PROP_HP, CFAPI_OBJECT_PROP_INT, CFAPI_OBJECT_PROP_INVENTORY, CFAPI_OBJECT_PROP_INVISIBLE, CFAPI_OBJECT_PROP_INVISIBLE_TIME, CFAPI_OBJECT_PROP_ITEM_POWER, CFAPI_OBJECT_PROP_LAST_EAT, CFAPI_OBJECT_PROP_LAST_GRACE, CFAPI_OBJECT_PROP_LAST_HEAL, CFAPI_OBJECT_PROP_LAST_SP, CFAPI_OBJECT_PROP_LEVEL, CFAPI_OBJECT_PROP_LORE, CFAPI_OBJECT_PROP_LUCK, CFAPI_OBJECT_PROP_MAGIC, CFAPI_OBJECT_PROP_MAGICAL, CFAPI_OBJECT_PROP_MAP, CFAPI_OBJECT_PROP_MATERIAL, CFAPI_OBJECT_PROP_MATERIAL_NAME, CFAPI_OBJECT_PROP_MAXGP, CFAPI_OBJECT_PROP_MAXHP, CFAPI_OBJECT_PROP_MAXSP, CFAPI_OBJECT_PROP_MERGEABLE, CFAPI_OBJECT_PROP_MESSAGE, CFAPI_OBJECT_PROP_MOVE_ALLOW, CFAPI_OBJECT_PROP_MOVE_BLOCK, CFAPI_OBJECT_PROP_MOVE_OFF, CFAPI_OBJECT_PROP_MOVE_ON, CFAPI_OBJECT_PROP_MOVE_SLOW, CFAPI_OBJECT_PROP_MOVE_SLOW_PENALTY, CFAPI_OBJECT_PROP_MOVE_STATUS, CFAPI_OBJECT_PROP_MOVE_TYPE, CFAPI_OBJECT_PROP_NAME, CFAPI_OBJECT_PROP_NAME_PLURAL, CFAPI_OBJECT_PROP_NEXT_ACTIVE_OB, CFAPI_OBJECT_PROP_NO_SAVE, CFAPI_OBJECT_PROP_NROF, CFAPI_OBJECT_PROP_OB_ABOVE, CFAPI_OBJECT_PROP_OB_BELOW, CFAPI_OBJECT_PROP_OTHER_ARCH, CFAPI_OBJECT_PROP_OWNER, CFAPI_OBJECT_PROP_PATH_ATTUNED, CFAPI_OBJECT_PROP_PATH_DENIED, CFAPI_OBJECT_PROP_PATH_REPELLED, CFAPI_OBJECT_PROP_PERM_EXP, CFAPI_OBJECT_PROP_PICK_UP, CFAPI_OBJECT_PROP_PICKABLE, CFAPI_OBJECT_PROP_POW, CFAPI_OBJECT_PROP_PRESENT, CFAPI_OBJECT_PROP_PREV_ACTIVE_OB, CFAPI_OBJECT_PROP_RACE, CFAPI_OBJECT_PROP_RESIST, CFAPI_OBJECT_PROP_RUN_AWAY, CFAPI_OBJECT_PROP_SHORT_NAME, CFAPI_OBJECT_PROP_SKILL, CFAPI_OBJECT_PROP_SLAYING, CFAPI_OBJECT_PROP_SP, CFAPI_OBJECT_PROP_SPEED, CFAPI_OBJECT_PROP_SPEED_LEFT, CFAPI_OBJECT_PROP_SPELL_ITEM, CFAPI_OBJECT_PROP_STR, CFAPI_OBJECT_PROP_SUBTYPE, CFAPI_OBJECT_PROP_TITLE, CFAPI_OBJECT_PROP_TYPE, CFAPI_OBJECT_PROP_VALUE, CFAPI_OBJECT_PROP_WC, CFAPI_OBJECT_PROP_WEIGHT, CFAPI_OBJECT_PROP_WEIGHT_LIMIT, CFAPI_OBJECT_PROP_WIS, CFAPI_OBJECT_PROP_X, CFAPI_OBJECT_PROP_Y, CFAPI_PARCH, CFAPI_PLAYER_PROP_BED_MAP, CFAPI_PLAYER_PROP_BED_X, CFAPI_PLAYER_PROP_BED_Y, CFAPI_PLAYER_PROP_IP, CFAPI_PLAYER_PROP_MARKED_ITEM, CFAPI_PLAYER_PROP_NEXT, CFAPI_PLAYER_PROP_PARTY, CFAPI_PLAYER_PROP_TITLE, CFAPI_PMAP, CFAPI_POBJECT, CFAPI_PPARTY, CFAPI_SINT64, CFAPI_SSTRING, CFAPI_STRING, liv::Cha, obj::chosen_skill, obj::client_type, liv::Con, obj::container, obj::contr, obj::count, obj::current_weapon, obj::custom_name, liv::dam, determine_god(), liv::Dex, obj::direction, obj::duration, obj::enemy, obj::env, liv::exp, obj::expmul, obj::face, obj::facing, find_marked_object(), first_player, FLAG_WAS_WIZ, liv::food, obj::gen_sp_armour, get_owner(), obj::glow_radius, liv::grace, obj::head, obj::hide, socket_struct::host, liv::hp, liv::Int, obj::inv, obj::invisible, is_friendly(), is_magical(), obj::item_power, obj::last_eat, obj::last_grace, obj::last_heal, obj::last_sp, obj::level, obj::lore, liv::luck, obj::magic, obj::map, obj::material, obj::materialname, liv::maxgrace, liv::maxhp, liv::maxsp, obj::move_allow, obj::move_block, obj::move_off, obj::move_on, obj::move_slow_penalty, obj::move_status, obj::move_type, obj::msg, archt::name, obj::name_pl, pl::next, obj::no_save, obj::nrof, new_face_struct::number, pl::ob, obj::other_arch, pl::party, obj::path_attuned, obj::path_denied, obj::path_repelled, obj::perm_exp, obj::pick_up, liv::Pow, present_arch_in_ob(), present_in_ob(), present_in_ob_by_name(), query_base_name(), QUERY_FLAG, query_name(), query_short_name(), obj::race, obj::resist, obj::run_away, pl::savebed_map, obj::skill, obj::slaying, snprintf(), pl::socket, liv::sp, obj::speed, obj::speed_left, obj::spellitem, obj::stats, liv::Str, obj::subtype, obj::title, pl::title, obj::type, obj::value, liv::wc, obj::weight, obj::weight_limit, liv::Wis, obj::x, and obj::y.

+ Here is the call graph for this function:

void* cfapi_object_give_skill ( int *  type,
  ... 
)

Definition at line 3189 of file plugins.c.

References CFAPI_POBJECT, and give_skill_by_name().

+ Here is the call graph for this function:

void* cfapi_object_identify ( int *  type,
  ... 
)

Wrapper for identify().

Parameters
typewill be CFAPI_NONE.
Returns
NULL.

Definition at line 3112 of file plugins.c.

References CFAPI_NONE, and identify().

+ Here is the call graph for this function:

void* cfapi_object_insert ( int *  type,
  ... 
)

Definition at line 3394 of file plugins.c.

References CFAPI_NONE, CFAPI_POBJECT, FLAG_FREED, FLAG_REMOVED, free_object(), insert_ob_in_map(), insert_ob_in_map_at(), insert_ob_in_ob(), llevError, LOG(), obj::name, QUERY_FLAG, and remove_ob().

+ Here is the call graph for this function:

void* cfapi_object_learn_spell ( int *  type,
  ... 
)

Definition at line 3829 of file plugins.c.

References CFAPI_NONE, and do_learn_spell().

+ Here is the call graph for this function:

void* cfapi_object_merge ( int *  type,
  ... 
)

Wrapper for merge_ob().

Parameters
typeWill be CFAPI_POBJECT.
Returns
NULL.

Definition at line 3512 of file plugins.c.

References CFAPI_POBJECT, and merge_ob().

+ Here is the call graph for this function:

void* cfapi_object_move ( int *  type,
  ... 
)

Moves an object.

Syntax is: cfapi_object_move(&type, kind) where kind is:

Parameters
typeunused
Returns
NULL.

Definition at line 1546 of file plugins.c.

References CFAPI_INT, move_ob(), move_player(), and pl::ob.

+ Here is the call graph for this function:

void* cfapi_object_on_same_map ( int *  type,
  ... 
)

Definition at line 3659 of file plugins.c.

References CFAPI_INT, and on_same_map().

+ Here is the call graph for this function:

void* cfapi_object_pay_amount ( int *  type,
  ... 
)

Wrapper for pay_for_amount().

Parameters
typewill be CFAPI_INT.
Returns
NULL.

Definition at line 3891 of file plugins.c.

References CFAPI_INT, and pay_for_amount().

+ Here is the call graph for this function:

void* cfapi_object_pay_item ( int *  type,
  ... 
)

Wrapper for pay_for_item().

Parameters
typewill be CFAPI_INT.
Returns
NULL.

Definition at line 3914 of file plugins.c.

References CFAPI_INT, and pay_for_item().

+ Here is the call graph for this function:

void* cfapi_object_pickup ( int *  type,
  ... 
)

Definition at line 4246 of file plugins.c.

References CFAPI_NONE, and pick_up().

+ Here is the call graph for this function:

void* cfapi_object_query_cost ( int *  type,
  ... 
)

Wrapper for query_cost().

Parameters
typeWill be CFAPI_INT.
Returns
NULL.

Definition at line 3752 of file plugins.c.

References CFAPI_INT, flags, and query_cost().

+ Here is the call graph for this function:

void* cfapi_object_query_money ( int *  type,
  ... 
)

Wrapper for query_money().

Parameters
typeWill be CFAPI_INT.
Returns
NULL.

Definition at line 3778 of file plugins.c.

References CFAPI_INT, and query_money().

+ Here is the call graph for this function:

void* cfapi_object_remove ( int *  type,
  ... 
)

Definition at line 3224 of file plugins.c.

References CFAPI_NONE, FLAG_REMOVED, llevError, LOG(), obj::name, QUERY_FLAG, and remove_ob().

+ Here is the call graph for this function:

void* cfapi_object_reset ( int *  type,
  ... 
)

Wrapper for clear_reset().

Parameters
typeWill be CFAPI_NONE.
Returns
NULL.

Definition at line 3606 of file plugins.c.

References CFAPI_NONE, and reset_object().

+ Here is the call graph for this function:

void* cfapi_object_say ( int *  type,
  ... 
)

Definition at line 4087 of file plugins.c.

References CFAPI_INT, command_say(), npc_say(), PLAYER, and obj::type.

+ Here is the call graph for this function:

void* cfapi_object_set_key ( int *  type,
  ... 
)

Write a key/value for an object.

Parameters
typewill contain CFAPI_SSTRING.
Returns
NULL.
See Also
set_ob_key_value().

Definition at line 1613 of file plugins.c.

References CFAPI_INT, and set_ob_key_value().

+ Here is the call graph for this function:

void* cfapi_object_set_property ( int *  type,
  ... 
)

Sets the property of an object. Will send changes to client if required. First argument should be an object*, second an integer.. Will not change an archetype's object.

Parameters
typewill contain the type of the first argument used to change the property.
Returns
NULL.

Definition at line 2459 of file plugins.c.

References obj::above, liv::ac, add_friendly_object(), obj::anim_speed, obj::animation_id, obj::arch, obj::attack_movement, obj::attacktype, pl::bed_x, pl::bed_y, CFAPI_DOUBLE, CFAPI_FLOAT, CFAPI_INT, CFAPI_INT16, CFAPI_LONG, CFAPI_NONE, CFAPI_OBJECT_PROP_AC, CFAPI_OBJECT_PROP_ANIM_SPEED, CFAPI_OBJECT_PROP_ANIMATION, CFAPI_OBJECT_PROP_ATTACK_MOVEMENT, CFAPI_OBJECT_PROP_ATTACK_TYPE, CFAPI_OBJECT_PROP_CHA, CFAPI_OBJECT_PROP_CHEATER, CFAPI_OBJECT_PROP_CHOSEN_SKILL, CFAPI_OBJECT_PROP_CON, CFAPI_OBJECT_PROP_CUSTOM_NAME, CFAPI_OBJECT_PROP_DAM, CFAPI_OBJECT_PROP_DEX, CFAPI_OBJECT_PROP_DIRECTION, CFAPI_OBJECT_PROP_DURATION, CFAPI_OBJECT_PROP_ENEMY, CFAPI_OBJECT_PROP_EXP, CFAPI_OBJECT_PROP_EXP_MULTIPLIER, CFAPI_OBJECT_PROP_FACE, CFAPI_OBJECT_PROP_FACING, CFAPI_OBJECT_PROP_FLAGS, CFAPI_OBJECT_PROP_FP, CFAPI_OBJECT_PROP_FRIENDLY, CFAPI_OBJECT_PROP_GEN_SP_ARMOUR, CFAPI_OBJECT_PROP_GLOW_RADIUS, CFAPI_OBJECT_PROP_GP, CFAPI_OBJECT_PROP_HIDDEN, CFAPI_OBJECT_PROP_HP, CFAPI_OBJECT_PROP_INT, CFAPI_OBJECT_PROP_INVISIBLE_TIME, CFAPI_OBJECT_PROP_ITEM_POWER, CFAPI_OBJECT_PROP_LAST_EAT, CFAPI_OBJECT_PROP_LAST_GRACE, CFAPI_OBJECT_PROP_LAST_HEAL, CFAPI_OBJECT_PROP_LAST_SP, CFAPI_OBJECT_PROP_LEVEL, CFAPI_OBJECT_PROP_LORE, CFAPI_OBJECT_PROP_LUCK, CFAPI_OBJECT_PROP_MAGIC, CFAPI_OBJECT_PROP_MATERIAL, CFAPI_OBJECT_PROP_MATERIAL_NAME, CFAPI_OBJECT_PROP_MAXGP, CFAPI_OBJECT_PROP_MAXHP, CFAPI_OBJECT_PROP_MAXSP, CFAPI_OBJECT_PROP_MESSAGE, CFAPI_OBJECT_PROP_MOVE_STATUS, CFAPI_OBJECT_PROP_NAME, CFAPI_OBJECT_PROP_NAME_PLURAL, CFAPI_OBJECT_PROP_NO_SAVE, CFAPI_OBJECT_PROP_NROF, CFAPI_OBJECT_PROP_OWNER, CFAPI_OBJECT_PROP_PATH_ATTUNED, CFAPI_OBJECT_PROP_PATH_DENIED, CFAPI_OBJECT_PROP_PATH_REPELLED, CFAPI_OBJECT_PROP_PERM_EXP, CFAPI_OBJECT_PROP_PICK_UP, CFAPI_OBJECT_PROP_POW, CFAPI_OBJECT_PROP_RACE, CFAPI_OBJECT_PROP_RESIST, CFAPI_OBJECT_PROP_RUN_AWAY, CFAPI_OBJECT_PROP_SKILL, CFAPI_OBJECT_PROP_SLAYING, CFAPI_OBJECT_PROP_SP, CFAPI_OBJECT_PROP_SPEED, CFAPI_OBJECT_PROP_SPEED_LEFT, CFAPI_OBJECT_PROP_SPELL_ITEM, CFAPI_OBJECT_PROP_STR, CFAPI_OBJECT_PROP_TITLE, CFAPI_OBJECT_PROP_VALUE, CFAPI_OBJECT_PROP_WC, CFAPI_OBJECT_PROP_WEIGHT, CFAPI_OBJECT_PROP_WEIGHT_LIMIT, CFAPI_OBJECT_PROP_WIS, CFAPI_PLAYER_PROP_BED_MAP, CFAPI_PLAYER_PROP_BED_X, CFAPI_PLAYER_PROP_BED_Y, CFAPI_PLAYER_PROP_MARKED_ITEM, CFAPI_PLAYER_PROP_PARTY, CFAPI_PLAYER_PROP_TITLE, CFAPI_POBJECT, CFAPI_PPARTY, CFAPI_SINT64, CFAPI_STRING, liv::Cha, obj::chosen_skill, CLEAR_FLAG, archt::clone, liv::Con, obj::container, obj::contr, copy_message(), obj::count, obj::custom_name, liv::dam, decrease_ob_nr(), liv::Dex, obj::direction, obj::duration, obj::enemy, obj::env, esrv_update_item(), liv::exp, obj::expmul, obj::face, obj::facing, first_player, fix_object(), liv::food, FREE_AND_COPY, obj::gen_sp_armour, get_player_container(), obj::glow_radius, liv::grace, obj::hide, liv::hp, liv::Int, obj::invisible, is_friendly(), obj::item_power, obj::last_eat, obj::last_grace, obj::last_heal, obj::last_sp, obj::level, obj::lore, liv::luck, obj::magic, obj::map, pl::mark, pl::mark_count, obj::material, MAX_BUF, liv::maxgrace, liv::maxhp, liv::maxsp, obj::move_status, obj::name, obj::name_pl, new_faces, pl::next, obj::no_save, obj::nrof, pl::ob, object_get_env_recursive(), P_NEED_UPDATE, pl::party, obj::path_attuned, obj::path_denied, obj::path_repelled, obj::perm_exp, obj::pick_up, PLAYER, liv::Pow, obj::race, remove_friendly_object(), obj::resist, obj::run_away, pl::savebed_map, send_changed_object(), SET_ANIMATION, set_cheat(), SET_FLAG, SET_MAP_FLAGS, set_owner(), obj::skill, obj::slaying, pl::socket, liv::sp, obj::speed, obj::speed_left, obj::spellitem, obj::state, obj::stats, liv::Str, sum_weight(), obj::title, pl::title, obj::type, UP_OBJ_FACE, UPD_NROF, UPD_WEIGHT, update_all_los(), socket_struct::update_look, update_ob_speed(), update_object(), update_position(), obj::value, liv::wc, obj::weight, obj::weight_limit, liv::Wis, obj::x, and obj::y.

+ Here is the call graph for this function:

void* cfapi_object_split ( int *  type,
  ... 
)

Wrapper for get_split_ob().

Parameters
typewill be CFAPI_POBJECT.
Returns
NULL.

Definition at line 3483 of file plugins.c.

References CFAPI_POBJECT, and get_split_ob().

+ Here is the call graph for this function:

void* cfapi_object_spring_trap ( int *  type,
  ... 
)

Definition at line 3677 of file plugins.c.

References CFAPI_NONE, and spring_trap().

+ Here is the call graph for this function:

void* cfapi_object_teleport ( int *  type,
  ... 
)

Teleports an object at a specified destination if possible.

Parameters
typeWill be CFAPI_INT.
Returns
NULL.

Definition at line 4210 of file plugins.c.

References CFAPI_INT, obj::contr, find_first_free_spot(), FLAG_REMOVED, insert_ob_in_map_at(), map_newmap_cmd(), out_of_map(), PLAYER, QUERY_FLAG, remove_ob(), pl::socket, and obj::type.

+ Here is the call graph for this function:

void* cfapi_object_transfer ( int *  type,
  ... 
)

Object transfer. Parameters are object*, int meaning: 0: call to transfer_ob() 1: call to insert_ob_in_map_at() 2: call to move_to()

Returns
NULL.

Definition at line 3941 of file plugins.c.

References CFAPI_INT, CFAPI_NONE, CFAPI_POBJECT, mapdef::enter_x, mapdef::enter_y, insert_ob_in_map_at(), move_to(), and transfer_ob().

+ Here is the call graph for this function:

void* cfapi_object_transmute ( int *  type,
  ... 
)

Definition at line 3206 of file plugins.c.

References CFAPI_NONE, and transmute_materialname().

+ Here is the call graph for this function:

void* cfapi_object_update ( int *  type,
  ... 
)

Wrapper for update_object().

Parameters
typeWill be CFAPI_NONE.
Returns
NULL.

Definition at line 3562 of file plugins.c.

References CFAPI_NONE, and update_object().

+ Here is the call graph for this function:

void* cfapi_object_user_event ( int *  type,
  ... 
)

Definition at line 4530 of file plugins.c.

References CFAPI_INT, and user_event().

+ Here is the call graph for this function:

void* cfapi_party_get_property ( int *  type,
  ... 
)

Party-related functions.

Parameters
typedata type returned.
Returns
NULL.

Definition at line 4320 of file plugins.c.

References CFAPI_NONE, CFAPI_PARTY_PROP_NAME, CFAPI_PARTY_PROP_NEXT, CFAPI_PARTY_PROP_PASSWORD, CFAPI_PARTY_PROP_PLAYER, CFAPI_PPARTY, CFAPI_PPLAYER, CFAPI_SSTRING, obj::contr, first_player, get_firstparty(), party_struct::next, pl::next, party_struct::partyname, and party_struct::passwd.

+ Here is the call graph for this function:

void* cfapi_player_can_pay ( int *  type,
  ... 
)

Wrapper for can_pay().

Parameters
typewill be CFAPI_INT.
Returns
NULL.

Definition at line 4188 of file plugins.c.

References can_pay(), and CFAPI_INT.

+ Here is the call graph for this function:

void* cfapi_player_find ( int *  type,
  ... 
)

Wrapper for find_player_partial_name().

Parameters
typewill be CFAPI_PPLAYER.
Returns
NULL.

Definition at line 4118 of file plugins.c.

References CFAPI_PPLAYER, and find_player_partial_name().

+ Here is the call graph for this function:

void* cfapi_player_message ( int *  type,
  ... 
)

Definition at line 4134 of file plugins.c.

References CFAPI_NONE, draw_ext_info(), flags, MSG_SUBTYPE_NONE, and MSG_TYPE_MISC.

+ Here is the call graph for this function:

void* cfapi_region_get_property ( int *  type,
  ... 
)
void* cfapi_set_random_map_variable ( int *  type,
  ... 
)

Wrapper for set_random_map_variable().

Parameters
typeunused.
Returns
NULL.

Definition at line 4485 of file plugins.c.

References CFAPI_INT, and set_random_map_variable().

+ Here is the call graph for this function:

void* cfapi_system_add_string ( int *  type,
  ... 
)

Wrapper for add_string().

Parameters
typewill be CFAPI_SSTRING.
Returns
NULL.

Definition at line 756 of file plugins.c.

References add_string(), and CFAPI_SSTRING.

+ Here is the call graph for this function:

void* cfapi_system_check_path ( int *  type,
  ... 
)

Wrapper for check_path().

Parameters
typewill be CFAPI_INT.
Returns
NULL.

Definition at line 822 of file plugins.c.

References CFAPI_INT, and check_path().

+ Here is the call graph for this function:

void* cfapi_system_directory ( int *  type,
  ... 
)
void* cfapi_system_find_animation ( int *  type,
  ... 
)

Wrapper for find_animation().

Parameters
typewill be CFAPI_INT.
Returns
NULL.

Definition at line 648 of file plugins.c.

References CFAPI_INT, and find_animation().

+ Here is the call graph for this function:

void* cfapi_system_find_face ( int *  type,
  ... 
)

Wrapper for find_face().

Parameters
typewill be CFAPI_INT.
Returns
NULL.

Definition at line 670 of file plugins.c.

References CFAPI_INT, and find_face().

+ Here is the call graph for this function:

void* cfapi_system_find_string ( int *  type,
  ... 
)

Wrapper for find_string().

Parameters
typewill be CFAPI_SSTRING.
Returns
NULL.

Definition at line 800 of file plugins.c.

References CFAPI_SSTRING, and find_string().

+ Here is the call graph for this function:

void* cfapi_system_re_cmp ( int *  type,
  ... 
)

Wrapper for re_cmp().

Parameters
typewill be CFAPI_STRING.
Returns
NULL.

Definition at line 848 of file plugins.c.

References CFAPI_STRING, and re_cmp().

+ Here is the call graph for this function:

void* cfapi_system_register_global_event ( int *  type,
  ... 
)

Definition at line 709 of file plugins.c.

References CFAPI_NONE, _crossfire_plugin::gevent, and plugins_find_plugin().

+ Here is the call graph for this function:

void* cfapi_system_remove_string ( int *  type,
  ... 
)

Wrapper for free_string().

Parameters
typewill be CFAPI_NONE.
Returns
NULL.

Definition at line 779 of file plugins.c.

References CFAPI_NONE, and free_string().

+ Here is the call graph for this function:

void* cfapi_system_strdup_local ( int *  type,
  ... 
)

Wrapper for strdup_local().

Parameters
typewill be CFAPI_STRING.
Returns
NULL.

Definition at line 694 of file plugins.c.

References CFAPI_STRING, and strdup_local().

+ Here is the call graph for this function:

void* cfapi_system_unregister_global_event ( int *  type,
  ... 
)

Definition at line 729 of file plugins.c.

References CFAPI_NONE, _crossfire_plugin::gevent, and plugins_find_plugin().

+ Here is the call graph for this function:

void* cfapi_timer_create ( int *  type,
  ... 
)

Wrapper for cfapi_timer_create().

Parameters
typeunused
Returns
always 0

Additional parameters:

Definition at line 1010 of file plugins.c.

References CFAPI_INT, cftimer_create(), cftimer_find_free_id(), TIMER_ERR_ID, and TIMER_ERR_NONE.

+ Here is the call graph for this function:

void* cfapi_timer_destroy ( int *  type,
  ... 
)

Wrapper for cftimer_destroy().

Parameters
typewill be CFAPI_INT.
Returns
always 0

Additional parameters:

  • timer: int that should be destroyed
  • err: int *which will contain the return code of cftimer_destroy().

Definition at line 1046 of file plugins.c.

References CFAPI_INT, and cftimer_destroy().

+ Here is the call graph for this function:

void cleanupPlugins ( void  )

Call closePlugin() on the various plugins, used at server shutdown.

Definition at line 4623 of file plugins.c.

References _crossfire_plugin::closefunc, _crossfire_plugin::next, and plugin_number.

Referenced by cleanup().

+ Here is the caller graph for this function:

static void copy_message ( object op,
const char *  msg 
)
static

Utility function to copy the string to op->msg and ensure there is a final newline.

Parameters
opobject to copy to.
msgmessage to copy.

Definition at line 2427 of file plugins.c.

References fatal(), FREE_AND_COPY, obj::msg, OUT_OF_MEMORY, and snprintf().

Referenced by cfapi_object_set_property().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int execute_event ( object op,
int  eventcode,
object activator,
object third,
const char *  message,
int  fix 
)

Definition at line 213 of file plugins.c.

References obj::below, EVENT_CONNECTOR, _crossfire_plugin::eventfunc, FLAG_UNIQUE, free_object(), obj::inv, llevDebug, llevError, LOG(), obj::map, obj::name, mapdef::name, object_get_env_recursive(), plugins_find_plugin(), QUERY_FLAG, remove_ob(), obj::slaying, obj::subtype, obj::title, obj::type, obj::x, and obj::y.

Referenced by user_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

command_array_struct* find_plugin_command ( char *  cmd,
object op 
)
Todo:
remove static buffer.

Definition at line 4568 of file plugins.c.

References _crossfire_plugin::next, and _crossfire_plugin::propfunc.

Referenced by execute_newserver_command().

+ Here is the caller graph for this function:

int initPlugins ( void  )

Definition at line 4588 of file plugins.c.

References closedir(), dirent::d_name, LIBDIR, llevInfo, LOG(), MAX_BUF, opendir(), PLUGIN_SUFFIX, plugins_init_plugin(), readdir(), and snprintf().

Referenced by server_main().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void plugins_display_list ( object op)

Definition at line 622 of file plugins.c.

References draw_ext_info(), draw_ext_info_format(), _crossfire_plugin::fullname, _crossfire_plugin::id, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_DEBUG, NDI_UNIQUE, and _crossfire_plugin::next.

Referenced by command_listplugins().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

crossfire_plugin* plugins_find_plugin ( const char *  id)

Definition at line 604 of file plugins.c.

References _crossfire_plugin::id, and _crossfire_plugin::next.

Referenced by cfapi_system_register_global_event(), cfapi_system_unregister_global_event(), and execute_event().

+ Here is the caller graph for this function:

int plugins_remove_plugin ( const char *  id)
static void send_changed_object ( object op)
static

Notify clients about a changed object.

Parameters
opthe object that has changed

Definition at line 184 of file plugins.c.

References obj::above, obj::container, obj::contr, obj::env, esrv_update_item(), first_player, get_player_container(), pl::next, pl::ob, PLAYER, pl::socket, obj::type, UPD_ALL, and socket_struct::update_look.

Referenced by cfapi_object_set_property().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int user_event ( object op,
object activator,
object third,
const char *  message,
int  fix 
)

Definition at line 209 of file plugins.c.

References EVENT_USER, and execute_event().

Referenced by cfapi_object_user_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

const hook_entry plug_hooks[NR_OF_HOOKS]
static

Definition at line 63 of file plugins.c.

int plugin_number = 0

Definition at line 154 of file plugins.c.

Referenced by cleanupPlugins(), plugins_init_plugin(), and plugins_remove_plugin().

crossfire_plugin* plugins_list = NULL

Definition at line 156 of file plugins.c.