From c273f4c8905b6d605b788e92ae145b5ba0efc2c7 Mon Sep 17 00:00:00 2001
From: Matthew Wild <mwild1@gmail.com>
Date: Mon, 12 Jan 2009 02:59:45 +0000
Subject: Set session.ip to the IP address of connecting clients

---
 core/sessionmanager.lua | 1 +
 1 file changed, 1 insertion(+)

diff --git a/core/sessionmanager.lua b/core/sessionmanager.lua
index 963de7ce..f04ca29c 100644
--- a/core/sessionmanager.lua
+++ b/core/sessionmanager.lua
@@ -58,6 +58,7 @@ function new_session(conn)
 	log("info", "open sessions now: ".. open_sessions);
 	local w = conn.write;
 	session.send = function (t) w(tostring(t)); end
+	session.ip = conn.ip();
 	return session;
 end
 
-- 
cgit v1.2.3