diff --git a/EcAlerter.h b/EcAlerter.h
index e6e3d22..ce73607 100644
--- a/EcAlerter.h
+++ b/EcAlerter.h
@@ -346,6 +346,10 @@
*
When an EcAlerter instance is used by a Control server process, diff --git a/EcAlerter.m b/EcAlerter.m index 9fa9011..c47cae4 100644 --- a/EcAlerter.m +++ b/EcAlerter.m @@ -36,6 +36,8 @@ #import "EcAlerter.h" #import "NSFileHandle+Printf.h" +static uint32_t throttleAt = 12; + @interface EcAlertRegex: NSObject { NSRegularExpression *regex; @@ -123,8 +125,6 @@ @implementation EcAlertThrottle -static uint32_t throttleAt = 12; - - (NSString*) description { char buf[BUFSIZ]; @@ -395,6 +395,10 @@ replaceFields(NSDictionary *fields, NSString *template) - (BOOL) configureWithDefaults: (NSDictionary*)c { + int i = [[c objectForKey: @"ThrottleAt"] intValue]; + + if (i <= 0 || i > 3600) i = 12; + throttleAt = i; debug = [[c objectForKey: @"Debug"] boolValue]; quiet = [[c objectForKey: @"Quiet"] boolValue]; supersede = [[c objectForKey: @"Supersede"] boolValue];