Deprecate internal_handler(), replace with EventRegistry::Register()

Added a couple explicit event declarations that were missing: "net_done"
and "dns_mapping_name_changed".
This commit is contained in:
Jon Siwek 2020-05-13 18:26:54 -07:00
parent f1e8289caa
commit 78e3267c44
13 changed files with 72 additions and 48 deletions

View file

@ -776,19 +776,5 @@ Func* internal_func(const char* name)
EventHandlerPtr internal_handler(const char* name)
{
// If there already is an entry in the registry, we have a
// local handler on the script layer.
EventHandler* h = event_registry->Lookup(name);
if ( h )
{
h->SetUsed();
return h;
}
h = new EventHandler(name);
event_registry->Register(h);
h->SetUsed();
return h;
return event_registry->Register(name);
}