aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2008-06-06 06:26:57 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2008-06-06 06:26:57 +0000
commit9cbeb3d2fe7eed426e42d5c27c7c02a77bf17257 (patch)
tree440c243e6c79fa577c6be01d87e4024ec6fec206
parentContract common email addresses. Need to put this into a config array later. (diff)
downloadrbot-bugzilla-9cbeb3d2fe7eed426e42d5c27c7c02a77bf17257.tar.gz
rbot-bugzilla-9cbeb3d2fe7eed426e42d5c27c7c02a77bf17257.tar.bz2
rbot-bugzilla-9cbeb3d2fe7eed426e42d5c27c7c02a77bf17257.zip
Make the timer configurable.
-rw-r--r--bugzilla.rb6
1 files changed, 5 insertions, 1 deletions
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