aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2008-06-06 01:51:11 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2008-06-06 01:51:11 +0000
commit1433cac7beb2bb185982df81c5fed7c3806ca6bb (patch)
treeaa799bec5138035b0350c69057a16e15b4fb4343
parentFactor out defaults usage in archstats func. (diff)
downloadrbot-bugzilla-1433cac7beb2bb185982df81c5fed7c3806ca6bb.tar.gz
rbot-bugzilla-1433cac7beb2bb185982df81c5fed7c3806ca6bb.tar.bz2
rbot-bugzilla-1433cac7beb2bb185982df81c5fed7c3806ca6bb.zip
Factor out dupe code in bug func.
-rw-r--r--bugzilla.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/bugzilla.rb b/bugzilla.rb
index 2c70bb1..28313bc 100644
--- a/bugzilla.rb
+++ b/bugzilla.rb
@@ -452,13 +452,14 @@ class BugzillaPlugin < Plugin
if params[:zilla] and bugno
check_zilla(params[:zilla])
- m.reply @zillas[params[:zilla]].summary(bugno)
+ zilla = @zillas[params[:zilla]]
elsif get_zilla(m)
zilla = get_zilla(m)
- m.reply zilla.summary(bugno)
else
m.reply "Wrong parameters, see 'help bug' for help."
+ return
end
+ m.reply zilla.summary(bugno)
rescue ::Exception => e
m.reply e.message
end