From 9cbeb3d2fe7eed426e42d5c27c7c02a77bf17257 Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" Date: Fri, 6 Jun 2008 06:26:57 +0000 Subject: Make the timer configurable. --- bugzilla.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bugzilla.rb b/bugzilla.rb index 8d5736a..5404bac 100644 --- a/bugzilla.rb +++ b/bugzilla.rb @@ -56,6 +56,10 @@ OPTIONS_INPUT_1 = /^(?:#{_OPTIONS_INPUT})$/ OPTIONS_INPUT_N = /^(?:#{_OPTIONS_INPUT})(?:,(?:#{_OPTIONS_INPUT}))*$/ class BugzillaPlugin < Plugin + Config.register Config::IntegerValue.new('bugzilla.announce_interval', + :requires_rescan => true, + :default => 300, + :desc => "Timer interval for announcements") # Exception class to raise when requesting information about an # unknown zilla instance. @@ -413,7 +417,7 @@ class BugzillaPlugin < Plugin @registry["channel_defaults"] = Hash.new end - @polling_timer = @bot.timer.add(300) { + @polling_timer = @bot.timer.add(@bot.config['bugzilla.announce_interval']) { poll_zillas } end -- cgit v1.2.3-65-gdbad