--- crossfire/server ---


Protocol:pserver User:anonymous
Machine:crossfire.cvs.sourceforge.net CVSROOT:/cvsroot/crossfire

Filename: plugins.c
Revision 1.79qal21 2006/09/17 00:34:39 +8 -3
Change cfapi_object_say() to use either command_say() or npc_say() depending on if the object is a player. Fixes bug #1534889.
Show difference between Revision 1.78 and 1.79
Revision 1.78ryo_saeba 2006/08/27 09:09:18 +43 -6
Add plugin access to move fields. Add sint64 type to plugin. 'AddExp' wrapper.
Show difference between Revision 1.77 and 1.78
Revision 1.77ryo_saeba 2006/08/20 04:59:28 +48 -3
Plugin wrappers for timers.
Show difference between Revision 1.76 and 1.77
Revision 1.76ryo_saeba 2006/08/15 08:43:46 +17 -2
Add plugin function to get time of day. Add matching Python function.
Show difference between Revision 1.75 and 1.76
Revision 1.75qal21 2006/08/12 14:38:23 +27 -8
Impliment cfpython map invalidation. Change behavoir of EVENT_MAP*
Show difference between Revision 1.74 and 1.75
Revision 1.74qal21 2006/08/08 13:17:54 +10 -2
Add no_save, and python object invalidation.
Show difference between Revision 1.73 and 1.74
Revision 1.73tchize 2006/07/02 10:32:35 +6 -6

more progress in unit testing, marked points of interrest in code
Show difference between Revision 1.72 and 1.73
Revision 1.72ryo_saeba 2006/05/20 10:47:48 +18 -2
Log hook for plugins. Use it for Python & cfanim.
Show difference between Revision 1.71 and 1.72
Revision 1.71ryo_saeba 2006/05/05 03:52:44 +16 -2
Add Map.Insert(object,x,y) and Player.CanPay( ) to Python plugin
Show difference between Revision 1.70 and 1.71
Revision 1.70tchize 2006/04/06 16:18:35 +3 -3

finished common/arch.c unit test, fixed a few bugs, moved function around and renamed other
Show difference between Revision 1.69 and 1.70
Revision 1.69ryo_saeba 2006/03/18 10:27:15 +2 -2
Typo.
Show difference between Revision 1.68 and 1.69
Revision 1.68ryo_saeba 2006/03/18 10:24:43 +3 -1
Add add_key to set_key (object) for plugins.
Show difference between Revision 1.67 and 1.68
Revision 1.67ryo_saeba 2006/03/18 09:05:37 +4 -4
Massive cleaning of code. Shouldn't be any functional change.
Show difference between Revision 1.66 and 1.67
Revision 1.66ryo_saeba 2006/02/15 14:37:45 +2 -2
Commit forgotten file
Show difference between Revision 1.65 and 1.66
Revision 1.65mwedel 2006/02/15 01:51:09 +2 -2
Minor bugfixes:
server/apply.c: Fix apply_transport ->contr checks to actually
check against correct values.
server/plugins.c: Replace CFAPI_INT16 with CFAPI_INT - there is no
declaration anyplace for CFAPI_INT16 so compiles fails.
server/swamp.c: Fix swamp code so that only objects that can be
picked up disappear - this way, transports don't disappear into
oblivion.
MSW 2006-02-15
Show difference between Revision 1.64 and 1.65
Revision 1.64ryo_saeba 2006/02/14 16:31:34 +2 -2
Misc plugin fixes
Show difference between Revision 1.63 and 1.64
Revision 1.63ryo_saeba 2006/01/15 10:50:38 +4 -3
Custom commands fixes. Global logout event change.
Show difference between Revision 1.62 and 1.63
Revision 1.62akirschbaum 2006/01/08 08:35:00 +1529 -1353
server/plugins.c: Just whitespace changes to make it conform to
programming_guide.
Show difference between Revision 1.61 and 1.62
Revision 1.61ryo_saeba 2006/01/07 11:41:32 +51 -3
Regions support for plugins
Show difference between Revision 1.60 and 1.61
Revision 1.60ryo_saeba 2005/12/17 13:42:52 +14 -13
Missing break. Add void to function declaration.
Show difference between Revision 1.59 and 1.60
Revision 1.59ryo_saeba 2005/12/17 12:21:44 +78 -9
Plugins can get party information
Show difference between Revision 1.58 and 1.59
Revision 1.58akirschbaum 2005/12/05 17:34:04 +2 -2
Apply patch #1371956 (code cleanup patch) by Stefan Huehner: fix old-style
function declarations and prototypes to proper Ansi C syntax. This patch
allows the compiler to check function arguments and also removes some warnings
when compiling with -Wstrict-prototypes.
Show difference between Revision 1.57 and 1.58
Revision 1.57ryo_saeba 2005/12/04 07:26:39 +5 -1
New plugin property 'marked item'
Show difference between Revision 1.56 and 1.57
Revision 1.56ryo_saeba 2005/11/20 09:08:39 +66 -4
Plugins can access archetypes. Added wrappers in Python.
Show difference between Revision 1.55 and 1.56
Revision 1.55mwedel 2005/11/16 02:16:09 +2 -2
Commit for new blocking code. Not going to dictate all the changes -
but will outline the broad points. Note also that the
doc/Developers/objects is updated and goes into more details also.
- check for P_WALL no longer used - instead, need to use GET_MAP_MOVE_BLCOK
and check against movement type of objects.
- arch_blocked() changed to ob_blocked(), now takes object. Needed because
just looking at archetype move_ values is no longer sufficient.
- find_first_free_spot() changed to take object, since it just calls
arch_blocked()
- FLAG_FLYING removed, now in move type.
- walk_on/walk_off/fly_on/fly_off removed - now based on move_on and
move_off fields.
- Map space structure extended to hold the move_on/move_off, etc
values so that we can shortcut some processing by not having to
check every object on the space when something enters it if
move_on isn't set.
- archetypes recollected - boulders needed move_walk to properly trigger
buttons.
- Note that the new plugin code has to be fixed up for the new movement
code. Look for FIXME in plugins/cfpython/cfpython_object.c
MSW 2005-11-15
Show difference between Revision 1.54 and 1.55
Revision 1.54akirschbaum 2005/11/10 02:22:11 +38 -1
server/plugins.c: Properly update client view after removing objects.
Show difference between Revision 1.53 and 1.54
Revision 1.53akirschbaum 2005/11/09 16:27:19 +38 -1
server/plugins.c: Properly update client view after changing object names.
Show difference between Revision 1.52 and 1.53
Revision 1.52akirschbaum 2005/11/09 15:46:59 +3 -1
server/plugins.c: Return an empty string if an object has no message. This
makes Object.Message() always return a string object, which removes the
need for special case code to handle empty messages.
Show difference between Revision 1.51 and 1.52
Revision 1.51akirschbaum 2005/11/01 09:36:19 +37 -4
Fix bug #815620 (CFPython.SetQuantity() doesn't update client): now notifies
the client after changing nrof and/or weight.
Show difference between Revision 1.50 and 1.51
Revision 1.50akirschbaum 2005/11/01 05:05:33 +37 -13
server/plugins.c: Print error message for event_xxx objects with missing or
invalid parameters. Also remove the affected object to prevent multiple
error messages.
Show difference between Revision 1.49 and 1.50
Revision 1.49ryo_saeba 2005/10/29 04:34:02 +2 -2
Win32 compilation fix. Plugin fix.
Show difference between Revision 1.48 and 1.49
Revision 1.48akirschbaum 2005/10/28 18:43:31 +3 -1
Prevent problems (crashes) for large item piles. Now limit nrof to less than 2^31.
Show difference between Revision 1.47 and 1.48
Revision 1.47akirschbaum 2005/10/28 14:08:53 +43 -11
Fix compiler warnings. Most changes do not change the program (remove unused
variables, convert "if(x = y)" into "x = y; if(x)"); a few actually fix
(possible) problems (fix uninitialized variables, fix printf format
specifiers, fix mismatches between signed and unsigned variables, add missing
return and default statements).
Show difference between Revision 1.46 and 1.47
Revision 1.46gros 2005/10/19 14:42:34 +10 -20
Various small fixes of the plugin subsystem.
Gros - 19/10/2005
Show difference between Revision 1.45 and 1.46
Revision 1.45gros 2005/10/18 11:54:31 +2759 -1284
Upgrade of the Crossfire server to version 2.0 of the plugin interface.
Upgrade of the Python plugin to version 2.0 of the plugin interface.
Gros - 18/10/05
Show difference between Revision 1.44 and 1.45
Revision 1.44akirschbaum 2005/10/07 12:54:48 +3 -3
common/{arch.c, object.c}, crossedit/{Attr.c, Defines.h, Edit.c},
include/libproto.h, server/{plugins.c, time.c}: Rename functions with
mixed-case names to lower case only.
crossedit/Defines.h: Remove prototypes for nonexisting functions.
Show difference between Revision 1.43 and 1.44
Revision 1.43ryo_saeba 2005/10/01 11:36:35 +2 -2
Clean some compilation warnings.
Show difference between Revision 1.42 and 1.43
Revision 1.42ryo_saeba 2005/09/30 14:14:32 +5 -1
Some plugin fixes, added [GS]etWeightLimit.
Show difference between Revision 1.41 and 1.42
Revision 1.41akirschbaum 2005/09/04 11:58:13 +2 -2
common/{anim.c, image.c, los.c, map.c, porting.c, treasure.c},
include/define.h, random_maps/treasure.c,
server/{apply.c, c_misc.c, c_object.c, c_wiz.c, commands.c, daemon.c,
hiscore.c, init.c, login.c, player.c, plugins.c, resurrection.c, weather.c},
socket/{init.c, item.c, loop.c, lowlevel.c}: Use LOG() for error messages and
debug output instead of stdout/stderr. Include filename in error messages.
server/resurrection.c: Fix error message in read_player().
Show difference between Revision 1.40 and 1.41
Revision 1.40ryo_saeba 2005/08/12 08:46:34 +4 -4
Fields changed from char* to const char*, cleanup.
Show difference between Revision 1.39 and 1.40
Revision 1.39akirschbaum 2005/07/18 14:07:07 +155 -226
server/plugins.c: Merge mostly identical code from #ifdef WIN32 and #else
blocks. Use opendir/readdir/closedir instead scandir for Unix because WIN32
probably does not have these functions. Prevent loading one plugin multiple
times.
include/sproto.h: Update prototypes for plugin functions.
server/c_wiz.c: Add success/failure messages to plugin and plugout commands.
Do not crash due to missing parameter.
Show difference between Revision 1.38 and 1.39
Revision 1.38ryo_saeba 2005/07/15 16:11:33 +180 -28
Massive plugin changes, fixes bugs for Win32
Show difference between Revision 1.37 and 1.38
Revision 1.37ryo_saeba 2005/07/15 08:51:52 +13 -1
Glue cleaning. New plugin function.
Show difference between Revision 1.36 and 1.37
Revision 1.36akirschbaum 2005/05/20 14:28:02 +17 -2
Ensure that object->msg always has a trailing \n character. This is necessary
to prevent corrupted map files.
Show difference between Revision 1.35 and 1.36
Revision 1.35tchize 2005/05/07 06:51:20 +2 -3

Corrected silinesses in code. Now compiles when CFLAGS=-ansi -pedantic
Show difference between Revision 1.34 and 1.35
Revision 1.34akirschbaum 2005/03/06 07:55:46 +2 -2
server/plugins.c: Fix pointer type mismatch while processing
CFPython.RegisterCommand.
Show difference between Revision 1.33 and 1.34
Revision 1.33akirschbaum 2005/01/07 09:24:03 +1 -2
plugin/include/plugin_python.h, plugin/plugin_python.c,
plugin_animator/plugin_animator.c, server/plugins.c: General cleanup - merge
duplicate code, remove debugging code, rename variables, rename C function
names to match the Python function name, use hook functions where
appropriate.
Show difference between Revision 1.32 and 1.33
Revision 1.32akirschbaum 2005/01/07 06:00:01 +5 -9
include/sproto.h, plugin/plugin_python.c, server/plugins.c, server/shop.c:
Use uint64 type for variables holding money. Use Python long integers to
pass these variables to/from the Python plugin.
Show difference between Revision 1.31 and 1.32
Revision 1.31akirschbaum 2004/10/19 15:31:32 +81 -328
plugin/plugin_python.c, plugin/include/plugin_python.h, server/plugins.c:
Fix comments, change whitespace.
Show difference between Revision 1.30 and 1.31
Revision 1.30akirschbaum 2004/10/18 01:35:38 +3 -3
include/sproto.h, server/egoitem.c: Change create_artifact() to return whether
the artifact was created.
server/plugins.c: Change CFWCreateArtifact()/HOOK_CREATEARTIFACT to return
whether the artifact was created.
plugin/plugin_python.c: Define new function create_object() to create
objects. Use this function to fix CFPython.CreateObjectInside() and
CFPython.CreateObject(): creation of artifacts does work now.
Show difference between Revision 1.29 and 1.30
Revision 1.29akirschbaum 2004/10/18 01:10:12 +11 -17
server/plugins.c: Remove the use of malloc() in initOnePlugin().
Show difference between Revision 1.28 and 1.29
Revision 1.28akirschbaum 2004/10/16 16:43:47 +2 -2
plugin/plugin_python.c, server/plugin.c, plugin_animator/animator_box.c: Fix
some more mismatches between plugin interface and implementation.
CFPython.Get/SetSkillExperience() use 64-bit exp values now.
CFPython.CastAbility() works again.
Show difference between Revision 1.27 and 1.28
Revision 1.27akirschbaum 2004/10/15 16:01:14 +4 -4
plugin/plugin_python.c, server/plugin.c: Fix type mismatches between plugin
interface and implementation.
Show difference between Revision 1.26 and 1.27
Revision 1.26akirschbaum 2004/10/15 13:34:32 +3 -4
plugin/plugin_python.c, server/plugin.c: Add/remove "static" to/from some
variables. Fixes a memory leak in CFPython.SaveObject().
Show difference between Revision 1.25 and 1.26
Revision 1.25temitchell 2004/08/02 18:27:55 +2 -2
- add event hooks for Kick and Muzzle(toggle_shout) commands
- fix CFSetQuantity by changing the int to uintand remove
- now looks for event scripts in python/events
Show difference between Revision 1.24 and 1.25
Revision 1.24mwedel 2004/04/25 02:17:40 +5 -1
Change most shop buy/sell functions to use 64 bit values. Problem arises
where player would sell valuable item, and if they wanted to buy them back,
it would overflow a 32 bit value, so they could buy them back for free.
Note quite as odd when you consider the buy/sell price for really valuable
items to be very different.
include/global.h: Add UINT32_MAX and other max type defines for our typedef
values so that we have standard setting of what the cap is.
server/apply.c: Change get_payment call to take second argument.
server/plugins.c: Add note about bug in handling of query_cost in this
function.
server/shop.c: query_cost() now returns 64 bit. Many other functions
updated to also take/return 64 bit cost values. Have cost_string
nicely deal with values that are beyond affordability. Rename get_payment2()
to get_payment(), and remove the later, which was just a simple wrapper
function that called get_payment2.
server/spell_effect.c: Update alchemy code. Remove some suspect use of
static values.
MSW 2004-04-24
Show difference between Revision 1.23 and 1.24
Revision 1.23mwedel 2004/01/19 23:48:39 +3 -3
Patch by Andreas Kirschbaum that fixes a bounds error on plugin setup.
MSW 2004-01-19
Show difference between Revision 1.22 and 1.23
Revision 1.22ryo_saeba 2003/11/07 13:54:49 +26 -26
Fixed newline issue with previous commit.
Show difference between Revision 1.21 and 1.22
Revision 1.21ryo_saeba 2003/11/07 13:01:30 +26 -1
Improved 'tell' command. Fix Win32-Python issues. Fix Win32 compilation issue.
Show difference between Revision 1.20 and 1.21
Revision 1.20mwedel 2003/09/13 00:02:12 +18 -18
Updated code for skill + spell code. skills and spells are now objects.
tuning these now means changing the archetypes. New spells can now
be added just by making a new archetype. Lots of code cleanup
also done.
MSW 2003-09-12
Show difference between Revision 1.19 and 1.20
Revision 1.19gros 2003/06/11 12:38:32 +14 -2
Added support for DecreaseObject, a wrapper for decrease_object
- Gros 11/06/03
Show difference between Revision 1.18 and 1.19
Revision 1.18gros 2003/05/31 06:48:27 +14 -2
Added a Python wrapper for the set_variable function - Gros 31/05/03
Show difference between Revision 1.17 and 1.18
Revision 1.17mwedel 2002/09/07 17:08:07 +8 -7
Automake patch - all files.
The changes for the source files is using confdir instead of
datadir.
Patch by Jacek Konieczny (jajcus@bnet.pl), applied by Mark Wedel,
2002-09-07.
Show difference between Revision 1.16 and 1.17
Revision 1.16mwedel 2002/03/20 00:27:46 +2 -2
Updates for 1.1.0 release - pretty much all minor bug fixes, like
compiler warning messages, invalid ANSI C constructs, missing files to
include in the distribution.
Makefile.in, include/version.h: update version.
include/Makefile.in: Add some missing files
include/libproto.h, sproto.h: rebuilt to prevent compiler warnings
lib/Makefile.in: Include the wizhelp files in the archive.
server/apply.c, server/skill_util.c: fix invalid code (function parameter
names can't match structs/typedefs), add a missing return value.
server/c_move.c, server/c_new.c, server/c_object.c, server/commands.c,
server/daemon.c: Don't include the sproto.h if CEXTRACT is defined.
server/plugins.c: fix printf command that was printing wrong value type.
doc/spoiler-html/Makefile.in: Remove extraneous newline
Show difference between Revision 1.15 and 1.16
Revision 1.15gros 2002/02/22 03:47:39 +12 -23
Bugfix - Fixed memory leak problems with find_plugin_command
Show difference between Revision 1.14 and 1.15
Revision 1.14mwedel 2002/02/05 23:54:47 +12 -2
common/map.c: load_map_header: If the map message is empty, don't copy
uninitialized data as the message. This fixes various crashes.
lib/Makefile.in: Remove the adm/*xpm* utilities, as they are no longer
needed or distributed.
server/apply.c: set the player speed to zero after they use a savebed.
Fixes crashes with players that have constant image animation (fireborns)
when they apply the savebed and the map then gets swapped out.
server/plugins.c: Fix some serious memory leaks. Some still remain, with
my comments included.
server/skills.c: Removed unused variable.
MSW 2002-02-05
Show difference between Revision 1.13 and 1.14
Revision 1.13mwedel 2001/12/15 21:31:03 +8 -1
common/object.c random_maps/Makefile.in
server/c_wiz.c server/player.c server/plugins.c server/timers.c
socket/request.c: Most of the changes are to just fix compiling warnings
or errors so that it compiles on sparc solaris with the workshop
compiler (things like }; should just be }). Declaration for alphasort
was missing in plugins.c. random_maps/Makefile.in had the wrong order in
linking - the system library needs to be linked in after the crossfire
libraries.
crossedit/App.c: Fix for running on 8 bit color - colormap was not being
initialized to usuable default value.
crossedit/xutil.c: Broken code when duplicating faces for undefined
images. That code should never really be used, as pixmaps currently
are always contiguous.
MSW 2001-12-15
Show difference between Revision 1.12 and 1.13
Revision 1.12michtoen 2001/11/19 17:30:28 +4 -4
Full support now for gender, rank and alignment.
Full support for guilds & quests in code, most script
functions included.

- some fixes
- old clients will not be effected
- to avoid treasure file error msg, collect arches
Show difference between Revision 1.11 and 1.12
Revision 1.11michtoen 2001/11/17 15:25:21 +6 -6
commit the ext2 gender & guild system - first part. Sorry, my cvs sytem is still broken, i will write a better doc to the list. Notice some other small fixes too.
Show difference between Revision 1.10 and 1.11
Revision 1.10michtoen 2001/11/15 21:34:00 +13 -13
Plugin_Python works now in Windows!

Alot of changes:
- New VisualC files to compile & install plugin_python.dll
and libcross.
- patch plugins.c and plugin_python.c to compiler under win32/VC
- remove some nasty bugs. The plugin now gives out correct version
messages and will be right noticed under dm command "pluglist"
- Fixed first plugin routines like "Say" and "initPlugin".

The whole package is running and ready for fix up!
Show difference between Revision 1.9 and 1.10
Revision 1.9mwedel 2001/11/13 02:14:26 +3 -3
Various minor bugfixes -
common/loader.c: rebuilt
include/map.h: Change width,height,enter_x,enter_y to be 16 bit instead
of 8 bits.
lib/treasures: change skull treasure to tooth instead of skull_tooth since
the later is not currently in the distributed archetypes file
server/monster.c: Optimize some code, remove some other that is not used.
server/plugins.c: Fix un initialized value in initPlugins that would
cause crash at startup if plugin directory does not exist.
MSW 2001-11-13
Show difference between Revision 1.8 and 1.9
Revision 1.8michtoen 2001/11/11 19:09:39 +16 -6
fix some bugs in plugin.c .

- I give all functions with a return definition a return
cmd-
- Refix an old bug - someone recommit it from local copy
- don't forget to update sproto.h when you insert new
functions in the modules
Show difference between Revision 1.7 and 1.8
Revision 1.7tchize 2001/11/11 06:37:10 +164 -3


server/plugins.c: adding new hooks
to handle the animation of an object
to clone an object
a wrapper to apply_below command
a wrapper to teleport object
a wrapper to communicate

Their purpose is to prepare the arrival of plugin_animator
Show difference between Revision 1.6 and 1.7
Revision 1.6gros 2001/11/11 03:39:54 +47 -20
Some bugfixes, new timer system, support for custom plugins commands, new plugin hooks - Gros 11/11/01
Show difference between Revision 1.5 and 1.6
Revision 1.5michtoen 2001/10/29 20:30:20 +0 -0
Remove a bug, reset some modules
Show difference between Revision 1.4 and 1.5
Revision 1.4michtoen 2001/10/29 18:49:03 +0 -0
really SOME fixes - most casting
Show difference between Revision 1.3 and 1.4
Revision 1.3michtoen 2001/10/29 17:24:13 +11 -4
no message
Show difference between Revision 1.2 and 1.3
Revision 1.2gros 2001/10/21 04:07:12 +219 -14
Some plugins improvements and bugfixes - Chachkoff Y. 10/21/01
Show difference between Revision 1.1 and 1.2
Revision 1.1gros 2001/10/14 02:57:14 None
Major changes: Added dynamic plugin support, removed old Guile support.
- Gros 10/14/01
First version


File made using version 1.98 of cvs2html by leaf at 2011-07-21 17:43