]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - lib/rbot/ircbot.rb
reaction: fix trigger regex to work with non-alphanumeric start/end.
[user/henk/code/ruby/rbot.git] / lib / rbot / ircbot.rb
index 7a021fb58f94bfa012840fcc57b20c648dfe77df..35fc2dfd4ac128e548d0bb2ae42245048c2b950e 100644 (file)
@@ -135,6 +135,12 @@ $interrupted = 0
 
 # these first
 require 'rbot/rbotconfig'
+begin
+  require 'rubygems'
+rescue LoadError
+  log "rubygems unavailable"
+end
+
 require 'rbot/load-gettext'
 require 'rbot/config'
 require 'rbot/config-compat'
@@ -1241,7 +1247,9 @@ class Bot
 
   # totally shutdown and respawn the bot
   def restart(message=nil)
-    message = "restarting, back in #{@config['server.reconnect_wait']}..." if (!message || message.empty?)
+    message = _("restarting, back in %{wait}...") % {
+      :wait => @config['server.reconnect_wait']
+    } if (!message || message.empty?)
     shutdown(message)
     sleep @config['server.reconnect_wait']
     begin