mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00

- Fixing the parts of the `make restdoc` and `make doc` process that were broken by the last Bro script re-organization - Generated documentation for Bro scripts derived from BiFs now use the original BiF source file as the "original source file" link - Renaming of the internal POLICYDEST definition and other misc places that refer to "policy" scripts; that terminology doesn't make total sense now - Added a documentation blacklist reminder test that will fail if there's scripts that are blacklisted from being documentated because they're still in progress - Some minor Bro script changes to fix small @load dependency errors Addresses #543
27 lines
735 B
Text
27 lines
735 B
Text
module Notice;
|
|
|
|
export {
|
|
redef enum Action += {
|
|
## Indicate that the generated email should be addressed to the
|
|
## appropriate email addresses as found in the
|
|
## :bro:id:`Site::addr_to_emails` variable based on the relevant
|
|
## address or addresses indicated in the notice.
|
|
ACTION_EMAIL_ADMIN
|
|
};
|
|
}
|
|
|
|
event notice(n: Notice::Info) &priority=-5
|
|
{
|
|
if ( |Site::local_admins| > 0 &&
|
|
ACTION_EMAIL_ADMIN in n$actions )
|
|
{
|
|
local email = "";
|
|
if ( n?$src && |Site::get_emails(n$src)| > 0 )
|
|
email = fmt("%s, %s", email, Site::get_emails(n$src));
|
|
if ( n?$dst && |Site::get_emails(n$dst)| > 0 )
|
|
email = fmt("%s, %s", email, Site::get_emails(n$dst));
|
|
|
|
if ( email != "" )
|
|
email_notice_to(n, email, T);
|
|
}
|
|
}
|