diff options
-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 |