diff options
Diffstat (limited to 'data')
-rw-r--r-- | data/rbot/plugins/seen.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/data/rbot/plugins/seen.rb b/data/rbot/plugins/seen.rb index babf7484..0fc6f076 100644 --- a/data/rbot/plugins/seen.rb +++ b/data/rbot/plugins/seen.rb @@ -81,14 +81,16 @@ class SeenPlugin < Plugin reg.last end - before = reg.first + if reg.kind_of? Array + before = reg.first + end formats = { :normal => _("%{nick} was last seen %{when}, %{doing}"), :with_before => _("%{nick} was last seen %{when}, %{doing} and %{time} before %{did_before}") } - if [:PART, :QUIT].include?(saw.type.to_sym) && + if before && [:PART, :QUIT].include?(saw.type.to_sym) && [:PUBLIC, :ACTION].include?(before.type.to_sym) did_before = case before.type.to_sym when :PUBLIC |