mirror of
https://github.com/zeek/zeek.git
synced 2025-10-06 16:48:19 +00:00
GH-236: Add zeek_script_loaded event, deprecate bro_script_loaded
This commit is contained in:
parent
a994be9eeb
commit
3ea34d6ea3
11 changed files with 58 additions and 12 deletions
|
@ -1171,11 +1171,14 @@ func_hdr:
|
|||
}
|
||||
| TOK_EVENT event_id func_params opt_attr
|
||||
{
|
||||
// Gracefully handle the deprecation of bro_init and bro_done
|
||||
// Gracefully handle the deprecation of bro_init, bro_done,
|
||||
// and bro_script_loaded
|
||||
if ( streq("bro_init", $2->Name()) )
|
||||
$2 = global_scope()->Lookup("zeek_init");
|
||||
else if ( streq("bro_done", $2->Name()) )
|
||||
$2 = global_scope()->Lookup("zeek_done");
|
||||
else if ( streq("bro_script_loaded", $2->Name()) )
|
||||
$2 = global_scope()->Lookup("zeek_script_loaded");
|
||||
|
||||
begin_func($2, current_module.c_str(),
|
||||
FUNC_FLAVOR_EVENT, 0, $3, $4);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue