diff options
author | dmitry kim <jason@nichego.net> | 2008-04-11 02:30:59 +0400 |
---|---|---|
committer | dmitry kim <jason@nichego.net> | 2008-04-11 02:30:59 +0400 |
commit | ac10728090f28a34593da1d125ebf0811d7d9691 (patch) | |
tree | 23c17d2c1cd6f1706700e7f87e24e98160f6f6e4 /lib/rbot | |
parent | 56fe4203025b373ce9c6d29b90a28533964e8287 (diff) |
* recalculate the relative version timestamp on !version
Diffstat (limited to 'lib/rbot')
-rw-r--r-- | lib/rbot/core/config.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/rbot/core/config.rb b/lib/rbot/core/config.rb index 1b14ebd8..203cf1de 100644 --- a/lib/rbot/core/config.rb +++ b/lib/rbot/core/config.rb @@ -10,8 +10,16 @@ class ConfigModule < CoreBotModule def version_string - _("I'm a v. %{version} rubybot%{copyright}%{url}") % { + if $version_timestamp.to_i > 0 + ago = String.new ' [' + ago << Utils.secs_to_string(Time.now.to_i - $version_timestamp.to_i) + ago << ' ago]' + else + ago = '' + end + _("I'm a v. %{version}%{ago} rubybot%{copyright}%{url}") % { :version => $version, + :ago => ago, :copyright => ", #{Irc::Bot::COPYRIGHT_NOTICE}", :url => " - #{Irc::Bot::SOURCE_URL}" } |