From f98282818db816df22bd6dc1632b7e47e6863a50 Mon Sep 17 00:00:00 2001
From: Auke Kok <sofar@foo-projects.org>
Date: Sat, 21 May 2016 22:43:14 -0700
Subject: [PATCH] Print reconnect interval, clean up reconnect comment.

Follows #23
---
 config.lua | 2 +-
 init.lua   | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/config.lua b/config.lua
index b1d62c3..c264d16 100644
--- a/config.lua
+++ b/config.lua
@@ -44,7 +44,7 @@ setting("bool",   "send_join_part", true) -- Whether to send player join and par
 setting("string", "password") -- Server password
 setting("bool",   "secure", false) -- Enable a TLS connection, requires LuaSEC
 setting("number", "timeout", 60) -- Underlying socket timeout in seconds.
-setting("number", "reconnect", 600) -- Reconnect in seconds after timeout.
+setting("number", "reconnect", 600) -- Time between reconnection attempts, in seconds.
 setting("string", "command_prefix") -- Prefix to use for bot commands
 setting("bool",   "debug", false) -- Enable debug output
 setting("bool",   "enable_player_part", true) -- Whether to enable players joining and parting the channel
diff --git a/init.lua b/init.lua
index 1e50a40..65c861f 100644
--- a/init.lua
+++ b/init.lua
@@ -113,8 +113,8 @@ function irc:connect()
 	end)
 
 	if not good then
-		minetest.log("error", ("IRC: Connection error: %s: %s -- Reconnecting in ten minutes...")
-					:format(self.config.server, message))
+		minetest.log("error", ("IRC: Connection error: %s: %s -- Reconnecting in %d seconds...")
+					:format(self.config.server, message, self.config.reconnect))
 		minetest.after(self.config.reconnect, function() self:connect() end)
 		return
 	end