--- deliantra/server/lib/cf.pm 2006/08/24 14:05:22 1.37 +++ deliantra/server/lib/cf.pm 2006/08/24 17:29:30 1.38 @@ -15,6 +15,7 @@ our %COMMAND; our @EVENT; +our @PLUGIN_EVENT; our %PROP_TYPE; our %PROP_IDX; our $LIBDIR = maps_directory "perl"; @@ -24,7 +25,7 @@ our $NEXT_TICK; BEGIN { - @EVENT = map lc, @EVENT; + @PLUGIN_EVENT = map lc, @PLUGIN_EVENT; *CORE::GLOBAL::warn = sub { my $msg = join "", @_; @@ -143,9 +144,9 @@ sub register { my ($base, $pkg) = @_; - for my $idx (0 .. $#EVENT) { - if (my $ref = $pkg->can ("on_$EVENT[$idx]")) { - #warn "registering $EVENT[$idx] hook to '$pkg'\n"; + for my $idx (0 .. $#PLUGIN_EVENT) { + if (my $ref = $pkg->can ("on_$PLUGIN_EVENT[$idx]")) { + #warn "registering $PLUGIN_EVENT[$idx] hook to '$pkg'\n"; $hook[$idx]{$base} = $ref; } } @@ -189,7 +190,7 @@ warn "removing extension $pkg\n"; # remove hooks - for my $idx (0 .. $#EVENT) { + for my $idx (0 .. $#PLUGIN_EVENT) { delete $hook[$idx]{$pkg}; }