1
0
Fork 0
mirror of git://git.psyced.org/git/psyced synced 2024-08-15 03:25:10 +00:00

ON_UNKNOWN hook

This commit is contained in:
psyc://psyced.org/~lynX 2011-07-24 12:12:43 +02:00
parent 2bba51c662
commit 8bdec308f8
3 changed files with 42 additions and 12 deletions

View file

@ -146,18 +146,23 @@ inherit NET_PATH "place/mailcast";
# ifdef PUBLIC
inherit NET_PATH "place/public";
# else
// special case in the archetype options logic, see also psyconf
# ifndef PLACE_HISTORY
# ifdef PLACE_HISTORY_EXPORT
# define PLACE_HISTORY
# ifdef ON_UNKNOWN
// special place type that supports unknownmsg()
inherit NET_PATH "place/intercept";
# else
// special case in the archetype options logic, see also psyconf
# ifndef PLACE_HISTORY
# ifdef PLACE_HISTORY_EXPORT
# define PLACE_HISTORY
# endif
# endif
# include "place.i" // archetype model generator code 2007
# ifdef PLACE_HISTORY
# define HISTORY // compatibility
# endif
# ifdef PLACE_OWNED
# define OWNED PLACE_OWNED // compatibility
# endif
# endif
# include "place.i" // archetype model generator code 2007
# ifdef PLACE_HISTORY
# define HISTORY // compatibility
# endif
# ifdef PLACE_OWNED
# define OWNED PLACE_OWNED // compatibility
# endif
# endif
# endif
@ -583,6 +588,14 @@ msg(source, mc, data, vars) {
}
#endif
// this hook only works in archetypes that support it
#ifdef ON_UNKNOWN
unknownmsg(source, mc, data, vars) {
ON_UNKNOWN
::unknownmsg(source, mc, data, vars);
}
#endif
#ifdef ON_ENTER
onEnter(source, mc, data, vars) {
ON_ENTER