diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2008-08-06 20:10:57 +0000 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2008-08-06 20:10:57 +0000 |
commit | deb6aa41163387d9347536861b1e26449fc12b55 (patch) | |
tree | 54996c59ac909676813f5131a3b2c35c25eac8ca | |
parent | Add support for templatable output. (diff) | |
download | rbot-bugzilla-deb6aa41163387d9347536861b1e26449fc12b55.tar.gz rbot-bugzilla-deb6aa41163387d9347536861b1e26449fc12b55.tar.bz2 rbot-bugzilla-deb6aa41163387d9347536861b1e26449fc12b55.zip |
Avoid a minor backtrace.
-rw-r--r-- | bugzilla.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/bugzilla.rb b/bugzilla.rb index 69d84d2..15d36bb 100644 --- a/bugzilla.rb +++ b/bugzilla.rb @@ -516,7 +516,9 @@ class BugzillaPlugin < Plugin # Given a user or channel name that is communicating with us, check to see if # we have a specific zilla to use for them. def get_zilla(m) - replyto = m.replyto.to_s + replyto = nil + replyto = m.replyto.to_s if m.is_a?(IRC::UserMessage) + return nil unless replyto return nil unless @defaults[replyto] return nil unless @defaults[replyto][:zilla] return @zillas[@defaults[replyto][:zilla]] @@ -524,7 +526,9 @@ class BugzillaPlugin < Plugin # Should we be lurking here to watch for bugs? def lurk?(m) - replyto = m.replyto.to_s + replyto = nil + replyto = m.replyto.to_s if m.is_a?(IRC::UserMessage) + return false unless replyto return false unless @defaults[replyto] return true if @defaults[replyto][:eavesdrop] end |