Crossfire Server, Trunk
|
Go to the source code of this file.
Functions | |
CF_PLUGIN int | closePlugin (void) |
CF_PLUGIN void * | eventListener (int *type,...) |
CF_PLUGIN void * | getPluginProperty (int *type,...) |
CF_PLUGIN void * | globalEventListener (int *type,...) |
void | initContextStack (void) |
CF_PLUGIN int | initPlugin (const char *iversion, f_plug_api gethooksptr) |
CFPContext * | popContext (void) |
CF_PLUGIN int | postInitPlugin (void) |
void | pushContext (CFPContext *context) |
CF_PLUGIN int | runPluginCommand (object *op, char *params) |
Variables | |
CFPContext * | context_stack |
static int | current_command = -999 |
CFPContext * | current_context |
CF_PLUGIN int closePlugin | ( | void | ) |
Close the plugin.
Closes the sqlite database.
Definition at line 295 of file plugin_template.c.
References cf_log(), llevDebug, and PLUGIN_VERSION.
CF_PLUGIN void* eventListener | ( | int * | type, |
... | |||
) |
Handles an object-related event. Doesn't do anything.
type | ignored. |
Definition at line 260 of file plugin_template.c.
References diamondslots::activator, _cfpcontext::activator, make_face_from_files::args, buf, cf_get_maps_directory(), cf_log(), animate::event, _cfpcontext::event, _cfpcontext::event_code, _cfpcontext::fix, is_animated_object(), llevDebug, MAX_BUF, diamondslots::message, _cfpcontext::message, _cfpcontext::options, popContext(), pushContext(), _cfpcontext::returnvalue, start_animation(), _cfpcontext::third, is_valid_types_gen::type, autojail::who, and _cfpcontext::who.
CF_PLUGIN void* getPluginProperty | ( | int * | type, |
... | |||
) |
Gets a plugin property.
type | ignored. |
Check if plugin handles custom command
Definition at line 78 of file plugin_template.c.
References make_face_from_files::args, buf, PLUGIN_NAME, PLUGIN_VERSION, and is_valid_types_gen::type.
CF_PLUGIN void* globalEventListener | ( | int * | type, |
... | |||
) |
Definition at line 141 of file plugin_template.c.
References _cfpcontext::activator, make_face_from_files::args, buf, cf_log(), _cfpcontext::event, EVENT_BORN, EVENT_CLOCK, _cfpcontext::event_code, EVENT_CRASH, EVENT_GKILL, EVENT_KICK, EVENT_LOGIN, EVENT_LOGOUT, EVENT_MAPENTER, EVENT_MAPLEAVE, EVENT_MAPRESET, EVENT_MUZZLE, EVENT_PLAYER_DEATH, EVENT_REMOVE, EVENT_SHOUT, EVENT_TELL, llevDebug, _cfpcontext::message, pl::ob, give::op, altar_valkyrie::pl, popContext(), pushContext(), _cfpcontext::returnvalue, _cfpcontext::third, is_valid_types_gen::type, and _cfpcontext::who.
void initContextStack | ( | void | ) |
Definition at line 41 of file plugin_template.c.
References context_stack, and current_context.
Referenced by postInitPlugin().
CF_PLUGIN int initPlugin | ( | const char * | iversion, |
f_plug_api | gethooksptr | ||
) |
Plugin initialisation function.
iversion | server version. |
gethooksptr | function to get the hooks. |
Main plugin entry point.
iversion | server version. |
gethooksptr | function to get hooks from. |
Definition at line 69 of file plugin_template.c.
References cf_init_plugin(), cf_log(), llevDebug, PLUGIN_VERSION, and nlohmann::detail::void().
CFPContext* popContext | ( | void | ) |
Definition at line 58 of file plugin_template.c.
References current_context, and _cfpcontext::down.
Referenced by eventListener(), and globalEventListener().
CF_PLUGIN int postInitPlugin | ( | void | ) |
Plugin was initialized, now to finish.
Registers events, initializes the database.
Definition at line 117 of file plugin_template.c.
References cf_log(), cf_system_register_global_event(), cfanim_globalEventListener(), EVENT_CLOCK, initContextStack(), llevDebug, PLUGIN_NAME, and PLUGIN_VERSION.
void pushContext | ( | CFPContext * | context | ) |
Definition at line 46 of file plugin_template.c.
References context_stack, current_context, and _cfpcontext::down.
Referenced by eventListener(), and globalEventListener().
Definition at line 113 of file plugin_template.c.
CFPContext* context_stack |
Definition at line 35 of file plugin_template.c.
Referenced by initContextStack(), and pushContext().
|
static |
Definition at line 39 of file plugin_template.c.
CFPContext* current_context |
Definition at line 37 of file plugin_template.c.
Referenced by initContextStack(), popContext(), and pushContext().