From deb6aa41163387d9347536861b1e26449fc12b55 Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" Date: Wed, 6 Aug 2008 20:10:57 +0000 Subject: Avoid a minor backtrace. --- bugzilla.rb | 8 ++++++-- 1 file 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 -- cgit v1.2.3-65-gdbad