diff options
author | 2008-06-06 18:33:11 +0000 | |
---|---|---|
committer | 2008-06-06 18:33:11 +0000 | |
commit | 3c4f182f87ac0d6423d319a6fa634488e2109bbe (patch) | |
tree | 31a163953dcdb2ff00b4aff2d0ab84bccfe9683c | |
parent | Fix regex for matching bugs. (diff) | |
download | rbot-bugzilla-3c4f182f87ac0d6423d319a6fa634488e2109bbe.tar.gz rbot-bugzilla-3c4f182f87ac0d6423d319a6fa634488e2109bbe.tar.bz2 rbot-bugzilla-3c4f182f87ac0d6423d319a6fa634488e2109bbe.zip |
Ensure that hashes in bug requests are always removed.
-rw-r--r-- | bugzilla.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bugzilla.rb b/bugzilla.rb index 4c0cbd0..d22cf44 100644 --- a/bugzilla.rb +++ b/bugzilla.rb @@ -465,8 +465,9 @@ class BugzillaPlugin < Plugin def listen(m) return if m.address? return unless lurk?(m) - return if m.message !~ /\bbug(?:\b[[:space:]]*\b)?#?([0-9]+)/i + return if m.message !~ /\bbug(?:[[:space:]]*)?#?([0-9]+)/i bugno = $1 + bugno.gsub!(/^#/,'') zilla = get_zilla(m) m.reply zilla.summary(bugno) end @@ -488,6 +489,7 @@ class BugzillaPlugin < Plugin def bug(m, params) begin bugno = params[:number].chomp("#") + bugno.gsub!(/^#/,'') if params[:number].nil? and params[:zilla] params[:number] = params[:zilla] |