diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2007-04-05 14:27:05 +0000 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2007-04-05 14:27:05 +0000 |
commit | 601a5f7f8b817f331c54165b20ed6482618b1c62 (patch) | |
tree | 592fb1a849e4524f20cf9ead6ceba886ac6f290e /lib/rbot | |
parent | 7232ed56774f9bfc89e4a31d486fa2f82bdec1ec (diff) |
Fix a bug introduced in [830]
Diffstat (limited to 'lib/rbot')
-rw-r--r-- | lib/rbot/ircbot.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/rbot/ircbot.rb b/lib/rbot/ircbot.rb index 036c0508..e5039248 100644 --- a/lib/rbot/ircbot.rb +++ b/lib/rbot/ircbot.rb @@ -894,9 +894,10 @@ class Bot end }.flatten - if all_lines.length > opts[:max_lines] + if opts[:max_lines] > 0 and all_lines.length > opts[:max_lines] lines = all_lines[0...opts[:max_lines]] - lines.last = lines.last.slice(0, left - truncate.size) << truncate + lines.last.slice!(0, left - truncate.size) + lines.last << truncate else lines = all_lines end |